I have a project that consists in aggregate traffic information on OpenStreetMap for routing proposes. My first idea is to use the OSM data from the region on a database, so I can aggregate the traffic information on the table, probably adjusting the cost column.

The problem is that all the routing software that I have already downloaded and tested creates a bin or obj file from the OSM instead of working with databases, so does anyone know an opensource software that creates and draw routes on OpenStreemaps based on database?

4 Answers 4


I would start with the OpenStreetMap Wiki. From there, I would say that pgRouting is one of the more popular OS DB routing tools. If going with the pgRouting approach, OSM2PO is a popular way of creating the sql import statements for large regions of OSM data, as I heard that the usual database import utility used with pgRouting, osm2pgrouting, has trouble with larger datasets.

  • Thanks @underdark.. I have done what you suggest and I am able to create the route and visualize on Map.. But I am facing a new issue, and I would like to know if you can help me.. As the map has nodes.. the route starts and ends exactly where there is a node.. so if I request a route from a place that is between two nodes.. it will actually starts from the nearest node, and it is not what I need.. I was wondering if there is a way to create more nodes in the map to reduce the distance between each pair.. or if there is another solution for this.. what do you think about it? Nov 19, 2012 at 13:43
  • There are some examples of people solving this problem with pgRouting. Check out gis.stackexchange.com/questions/16157/…
    – maw269
    Dec 5, 2012 at 16:32

In addition to the suggestion by maw269 (which I also recommend), you can do OSM routing with SpatiaLite. There is a step-by-step tutorial on the SpatiaLite documentation page (direct link to PDF).

Obviously PostGIS will give you better scalability / multi-user capability, but if your needs are limited (in particular, the area is small), then SpatiaLite may be easier to get set up.


if your data are not too complex, you could also try the road graph plugin in qgis. more infos here:

the roadgraph plugin accepts any vector-layer with lines , so you could use e.g. not only shapefiles but also spatialite, osm ...

  • Hey @RyanDalton, thank you for your reply.. I am looking for a web based solution.. I want to create an website with this service.. Dec 12, 2012 at 17:38

Routing using OSM data, you say? Check out OSRM - https://project-osrm.org/

If you can run a docker container, you can set up a routing server in less than an hour with OSRM. You can get route steps or entire route geometries between points. You can do lots of other cool things that are covered in the docs.

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.