eclipse-sumo/sumo

import GPS data to sumo

Closed this issue · 6 comments

Add your issue description here.
Hi, recently I received vehicle GPS data from a scholar and I want to directly import it into SUMO for simulation.

If possible, upload an example that shows your problem.
Although the official website's FAQ section provides relevant solutions, there isn't a specific case available for reference. Additionally, typical route files require the definition of TAZ. Is it feasible to directly insert vehicles based on longitude and latitude?

The format of the data I have obtained is shown as follows,The last column provides the speed data for that moment:
22223,21:09:38,114.138535,22.609266,19
22223,11:14:18,114.137871,22.575317,0

SUMO-version:
SUMO 1.19.0
operating system:
Windows 10

I've use tracemapper.py and routecheck.py both, to identify edges for each vehicle in route.xml. However, tracemapper.py doesn't work well, so I made another filtering and parsing python code to correct it.

I've use tracemapper.py and routecheck.py both, to identify edges for each vehicle in route.xml. However, tracemapper.py doesn't work well, so I made another filtering and parsing python code to correct it.

My friend, can you provide more details for me to learn?Thank you.

See tracemapper.py docs. Please be aware that the script may encounter problems if your trajectory does not completely align with your SUMO network (e.g. GPS points on the opposite driving direction or on some orthogonal road at an intersection).

See tracemapper.py docs. Please be aware that the script may encounter problems if your trajectory does not completely align with your SUMO network (e.g. GPS points on the opposite driving direction or on some orthogonal road at an intersection).

Thank you for your advice!But do we need to convert the coordinates when using it, as shown in the following figure?
image
As you can see, these coordinates are impossible to be latitude and longitude. Additionally, this usage does not require entering the time. Can we add the attribute value of "depart" later?

The script works both with geographic coordinates and plain orthographically projected coordinates. Activate the switch --geo if you use geographic coordinates.

I recommend adding "--direction" option when using tracemapper to it and using routecheck.py to see if it connect the edges in order in net.xml. Left turn traces does not quite match well. So, it needs to be checked well. For adding departure time, I used xml.etree.ElementTree library which deals xml data in python.