Does anyone have any tutorial, link, video etc on how I can use Open Street Map for routes? I know google maps and saw that I can easily do that. But this application will have an internal module and we can not afford the license.


4 Answers 4


GraphHopper (using OpenStreetMap Data)

GraphHopper offers memory efficient algorithms in Java for routing on graphs. E.g. Dijkstra and A* but also optimized road routing algorithms like Contraction Hierarchies. It stands under the Apache License and is build on a large test suite.

OpenStreetMap is directly supported from GraphHopper. Without the amazing data from OpenStreetMap GraphHopper wouldn't be possible at all. Other map data will need a custom import procedure.

Video https://www.youtube.com/watch?v=HBVe_E5j0TM


The other answers on this page provide some great specific details - but I think a more general answer to the question is in order (not least for future viewers with similar problems):

There are many many methods to work with routing based on Openstreetmap data. A key information page on this is the OSM wiki page on routing It's important to understand that the services available on any one Openstreetmap based website, or from any one tool, will be limited - an in particular that the website openstreetmap.org isn't designed to be a one-stop-shop - that the value in the Openstreetmap project comes from the huge range of services, maps and apps based on the OSM data.

If you go looking you'll find a large number of tutorials and websites offering information about how to work with the many different possible individual solutions to your question. Simply 'how to do routing based on Openstreetmap' is a very big subject.


pgRouting is another routing option using OpenStreetMap data. pgRouting.org

pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality.

Core Features pgRouting provides functions for:

  • All Pairs Shortest Path, Johnson’s Algorithm
  • All Pairs Shortest Path, Floyd-Warshall Algorithm
  • Shortest Path A*
  • Bi-directional Dijkstra Shortest Path
  • Bi-directional A* Shortest Path
  • Shortest Path Dijkstra
  • Driving Distance
  • K-Shortest Path, Multiple Alternative Paths
  • K-Dijkstra, One to Many Shortest Path
  • Traveling Sales Person
  • Turn Restriction Shortest Path (TRSP)
  • Shortest Path Shooting Star

Here's a link to their workshop / tutorial : workshop.pgrouting.org

  • In this case I'll have to upload a shape of streets into PostGIS? If in case there is a new road, for example, will have to refzer uploading. There is a ready api like google maps? Openlayers makes routes?
    – csf
    Commented Jul 16, 2014 at 18:48
  • Yes, you need to download OSM data, then import it into PostGIS. I have used osm2pgrouting which automatically converts to pgRouting compatible. For new roads, you can download the weekly changeset from planet.openstreetmap.org and import that with osm2pgrouting I believe, though I have not tried that yet.
    – widesGIS
    Commented Jul 17, 2014 at 22:13

We provide a free OSM converter, which you can use to import OSM data into our routing solutions. Could be either RW NetServer 3 (standalone server application) or RW Net 4 (.NET component). Both can be seen on www.routeware.dk and provides standard features such as routing, driving directions, travelling salesman optimization etc.

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.