I'm totally new to this domain so my question may sound like a little bit silly……

I'm eager to know how to extract, store and index the coordinates of the road segments(edges) and intersections or endpoints(nodes) according to a digital city map.

First, the map contains a lot of layers yet I'm only concerned about the roads layer. It seems like I'm not allowed to choose a certain layer map (road layer) to be exported in OpenStreetMap. Is there any solution or alternative map to recommend?

Second, I have no idea what software or programming language is appropriate to extract the road network. I downloaded and installed arcGIS which seems like a very complicated software and I just want to learn the skills that I need to solve my problem. So I hope someone could recommend some software or tutorial or just give a clue to me.

Third, if there is a flyover or overpass in the map, how to distinguish it from other roads? After extracting the road segments from map, how to store them and index them like using a database?

Many thanks!

  • The coordinates refer to the geographical coordinate and I also want to know how the different resolution of digital map will influence the extraction result. Mar 3, 2014 at 13:44

1 Answer 1


Ok a lot of questions, so I will start with a general hint:

What you are looking for is just a 'routing graph' for a geodata set (here: OSM). As you say this graph needs to fullfil certain properties (as connectivitiy, level of detail, ...) but IMHO your cell approach sounds a bit complicated. There are existing solutions to turn OSM raw data into graph structures:

And of course there are a lot of routers that need to do this step, too:

So now to your questions:

to 1.) No OSM doesn't has a layer concept for various reasons. What you do is to make use of an API or data dump and filter for your objects:

IMHO you can start by filtering for highway=* tagged objects, but this depends on your exact usecase..

to 2.) The filtering can be done in very simple syntax like Overpass lang or you create some expressions for osmosis. Not very difficult as OSM data model is very simple (but IMHO powerful). ArcGIS itself is a complete Geoinformationsystem and might be a bit to hard if you just want to make use of pure OSM data. But they seem to have also an importer for OSM roadnetworks.

to 3.) You don't need to make use of a expensive commercial product. For example you can use QGIS for visualization and osm2po (or osm2pgrouting) for importing OSM data to a postGIS geospatial database. Then the pgrouting library can use the data for routing: http://anitagraser.com/2011/02/07/a-beginners-guide-to-pgrouting/

Not sure what is a wise way as we don't know your plan or task to realize...

  • I'm very appreciated for your thorough explanation. Mar 4, 2014 at 2:17
  • Actually I want to realize the trajectory-map matching. I've read some references which however assumed a ready-made road network was at hand and didn't elaborate how to construct such a road network. That's why I asked this long question. Thank you very much for your kindness and now I have a little idea to solve my problem. Mar 4, 2014 at 2:37
  • Ok but IMHO you need a max. resolution road network (so geospatial linestrings) and not a pure routing graph (just connections using weighted edges but no geocontext).
    – Mapper
    Mar 4, 2014 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.