[GIS] How to build, store and index a road network from a digital city map

geometric-networkindexingopenstreetmaproad

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!

Best Answer

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:
https://wiki.openstreetmap.org/wiki/Routing

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...

Related Question