This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to generate turn by turn instructions from OSM data

0

Hi, I have extracted street data from OpenStreetMap and structured the data street by street. Is there any help on how I can write a simple routing algorithm based on the extracted data to generate turn-by-turn instructions if a user chooses one street as the starting point and then another street as the destination?

asked 01 Jun '23, 00:28

Segunlakata's gravatar image

Segunlakata
16131316
accept rate: 0%


One Answer:

2

There are ready-made algortihms out there on GitHub that do what you want - check out OSRM or GraphHopper. These are sophisticated routing engines where a lot of work has gone not into making them fast but also making the instructions good - which is more difficult than you might expect! Even if you decide to write your own routing engine for educational purposes, it might make sense to have a look at how these programs generate turn instructions.

answered 01 Jun '23, 08:34

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Thank you Frederik for your response always!

(02 Jun '23, 02:01) Segunlakata

Source code available on GitHub .