This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

Export specific roads for Sumo simulation

0

Hello there,

I am currently working on simulating DSRC vehicular communication on roads in my area. I am using Omnet/Sumo/Veins to perform the simulation. I am really happy with how easy it is to export road data from OSM and plug it into the simulation.

Now, I am having trouble setting up the simulation to narrow in on the roads we have specifically tested. I would like to export only the roads we have data for to run in Omnet. It seems like the Overpass API is a good way to go, but I may be off base here. Any other suggestions would be very helpful!

If Overpass is the way to go, I have two questions:

  1. How do I find the way(id) of the road I want. I found I can select specific roads with way(id), but I don't know how to find the road I specifically want. Once I export this data it will be plugged into the sim, so I am not concerned about this road ID changing after I export.
  2. Does Overpass export to .osm files? This seems to be the only way to convert a map file to what I need for Sumo.

I am very new with OSM, so any direction would be very helpful. Thank you so much!

asked 02 Aug '17, 23:16

le_sanglier's gravatar image

le_sanglier
11112
accept rate: 0%


One Answer:

3

The xml option on Overpass-API is what you would expect in a .osm file.

If you have locations associated with your testing you could use the around filter with a suitable distance to find the highways of interest.

Otherwise you will probably have to resort to a manual process. One way to do it would be to download just the highways in the area of interest using Overpass-API and then pare that data down in JOSM (being careful not to upload damaging deletions). File->Save in JOSM will output the same osm xml.

answered 03 Aug '17, 00:06

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

edited 03 Aug '17, 02:24

Thanks so much! To be honest, that is what I was afraid of, haha. I was trying that earlier, but the output was rather sloppy. I will just have to get better at it. Thanks again for the response!

(07 Aug '17, 17:31) le_sanglier