I try to use OpenStreetMap (OSM) to create a large (several countries) network of main roads, railways and inland waterways. These networks will be used for transport policy related questions. The transport demand is embedded in large/huge origin-destination matrixes (sometimes several million OD relations). Therefore, for performance reasons, the networks should not contain unnecessary nodes or links.

It is rather easy to filter OSM in order to retrieve only the main networks and to make them routable, using tools such as osmfilter and osm2pgrouting with pgsql / pgrouting. The problem is that the resulting routable networks contain many unneeded vertices and edges. For instance, all the vertices corresponding to crossroads on the main network with a secondary road are still present. However, these nodes could be removed if only two links are connected to and that they have the same characteristics. The attached image illustrates the (main) road network of Luxemburg. You can see that it contains many unneeded nodes.

Do you know a (preferably portable – Mac-Linux-Windows) tool that helps to simplify such networks, while keeping the geometry of the merged links knowing that the resulting network has to be exported (as shapefiles for instance) outside pgRouting to be used in another GIS our routing software ?

More Bart Jourquin's questions See All
Similar questions and discussions