Dear Mirko, dear Fereshteh,

there is a tool for that: 
https://sumo.dlr.de/docs/Tools/Detector.html#mapdetectorspy

Jan

On Fri, 14 Jul 2023, at 8:31 AM, Mirko Barthauer via sumo-user wrote:
> You'll have to do this in a few steps:
> 
>  • import your geo-referenced network
>  • convert your detector coordinates in Python using sumolib.net (see docs 
> <https://sumo.dlr.de/docs/Tools/Sumolib.html>, reference 
> <https://sumo.dlr.de/pydoc/sumolib.net.html>)
>    • load the network
>    • read your detector coordinates from input
>    • for each detector coordinate:
>      • get point in XY space: sumolib.net.*convertLonLat2XY*
>      • *store obtained lane and position of the detector from 
> sumolib.net.lane.getClosestLanePosAndDist*
>    • write the detector additional
> Best regards
> 
> Mirko
> 
>  
> 
>  
> 
>  
> 
>  
> 
> -----Original-Nachricht-----
> 
> Betreff: [sumo-user] Routes from counting data
> 
> Datum: 2023-07-13T16:32:47+0200
> 
> Von: "fereshte jafari via sumo-user" <[email protected]>
> 
> An: "Sumo project User discussions" <[email protected]>
> 
>  
> 
>  
> 
>  
> 
> Hello!
>  
> I have a question regarding the detector file.
> As it is mentioned in 
> https://sumo.dlr.de/docs/Demand/Routes_from_Observation_Points.html, SUMO 
> requires the position of the detector on the lane to be expressed in meters. 
> Specifically, the position should fall within the range of -1*lane's length 
> to the lane's length. What I have in my database of detectors is the 
> "latitude" and "longitude" of detectors. I wanted to know whether SUMO can 
> read the "latitude" and "longitude" of detectors and locate the detectors on 
> the network or not. If yes, could you please guide me on how to insert this 
> information in the detector file?
>  
> Thanks in advance.
>  
> --
> *Sincerely,*
> *Fereshteh Jafari Shahdani*
> *PhD candidate, Dep. of Civil Engineering*
> *ISISE - University of Minho***
> 
>  
> 
> 
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To unsubscribe from this list, visit 
> https://www.eclipse.org/mailman/listinfo/sumo-user
> 
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to