Search code examples
openstreetmapsumo

can I generate automatically a file that has the locations of bus station positions based on a map from OpenStreetMap?


I'm a new user of SUMO simulator. I downloaded a map from the OpenStreetMap website and as far as I understand I need to run a netconvert command in cmd to get a .net.xml file that I can open it with net edit.

my problem is I want to:

  • highlight the locations of the bus stations (because the simulation I would like to do is on bus routing)
  • and the paths that the bus can take (the normal ones that the buses usually take in that city).

from what I understand the routes that a bus can take should be in a rou.xml file and the bus station locations will be in another file (additional file)

my questions:

  • can I highlight the bus station's location and also the routes that a bus is allowed to take automatically (based on the real data from the map itself)?
  • does the command netconvert has any relationship with extracting data that has a relation with the bus station locations (is there a parameter to insert it to get an output file that has information about the locations)?
  • also incase I want to make the bus use a certain search algorithm to use it while moving such A* algorith how can I do that?

Thank you


Solution

  • If your city is not too big, the easiest way to retrieve all this data is to use the OSM web wizard which is a program which comes with SUMO and should be in your start menu if you installed SUMO properly. There you can select the region you want to extract and if you enable the "Import Public Transport" checkbox all bus stops and bus lines which are present in OSM will be extracted. If your city is too big or for some reason you want to use the OSM file you already extracted, please start with a osmWebWizard scenario of a smaller part nevertheless. You will find a osm.netccfg and a build.bat file in the generated directory which you then also use with your bigger scenario to generate the public transport data. You can basically just replace the osm_bbox.xml.gz file with your own file and run the netccfg with netconvert and the build.bat afterwards. The details are in the docs.