Hello Everyone,

I got bored latelly and was thinking about a new programming challenge for myself. I decided to create a route planner. Because i’m completely new to this topic i wanted to know from you where I should start looking for information on how to create one? I already found some info about dijkstra’s algorithm for finding shortest routes in a graph. But where to get the data? Can openstreetmap provide such a graph and if yes how to obtain it etc?

Because i dont know anything about developing a routeplanner I think it is ‘just’ something like. Get latlong for point A and B. Get a graph with vectors that are between those two points and then calculate the shortest routes for that graph. Is this assumption correct?

Can someone help me in the right directions please? :slight_smile:

There is a LOT more to it then that.

First of all, your Graph may be serveral hundred Gigabyte in size.
(Think of all the minor roads of 5 continents.)

Number one tip: Start with a very SMALL map. :wink: The UK, for example, has on the order of 5 to 10 million nodes.

Writing route planners can be fun.

Also, don’t assume the OSM data is necessarily correct. There are lots of one-way roads/roundabouts headed the wrong direction. Check with JOSM to make sure the bug is definitely at your end.