I'm trying to create a web application that given two points : S(lat,long) and D(lat,long), find the shortest path between them. My problem is : I do not know how to use A* or other AI algorithm to find the shortest path given the nodes and ways from here : "http://overpass.osm.rambler.ru/cgi/interpreter?" and after that reconstruct the solution, building the path in the map. I'm using Overpass API to get the nodes and ways, using an approach by "rectangle" between the geo points(i know this is bad, because you can have a shortest path the is not in this rectangle, but i do not see a better solution with this API). This is a paper I must make to AI course in my university. Short Version : - Anyone knows how to make shortest path algorithm using A* with given nodes and ways?
- Anyone knows which nodes and ways to get? I'm using the approach to get nodes and ways inside the rectangle between the Start and Destination points, but it does not work with points in the same line.
Thank you. |

Cross post: http://stackoverflow.com/questions/29639968/shortest-path-using-openstreetmap-datanodes-and-ways