I want to write an offline app that read my country's map and the end user can select two points on the map and the app must calculate all ways between these points and based on some other condition show the best way to the user asked 28 Jun '16, 06:28 Moolerian |
You almost certainly do not want all ways since that would be a very large number (including all detours). What you are looking for is a routing algorithm; you don't want to compute all ways first and then select the best, but instead apply an algorithm that finds the best right away. There are ready-made routing engines for OSM that you could use (e.g. GraphHopper), or building blocks that you can somehow call from your application (e.g. libosmscout). Of course you can also choose to write everything yourself; search for the terms "routing" and "graph" on this help site for more pointers. answered 28 Jun '16, 06:49 Frederik Ramm ♦ thank you , i know that i don't want ALL ways i want sth like google direction in it's map but mine is offline and suggested direction based on some manual conditions
(28 Jun '16, 07:11)
Moolerian
Hello Moolerian, I assume that you have already seen the OSM wiki page http://wiki.openstreetmap.org/wiki/Routing ... also with its sub pages about online and offline routing ... What solution comes near your aim? IIRC graphhopper has now a feature implemented about alternative routes.
(01 Jul '16, 15:16)
stephan75
|