NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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 :

  1. Anyone knows how to make shortest path algorithm using A* with given nodes and ways?
  2. 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.

asked 15 Apr '15, 21:09

Mixxer's gravatar image

Mixxer
10113
accept rate: 0%

closed 15 Apr '15, 22:34

mmd's gravatar image

mmd
5.7k15388

The question has been closed for the following reason "Question was cross posted on stackoverflow." by mmd 15 Apr '15, 22:34

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×305
×74
×60
×6

question asked: 15 Apr '15, 21:09

question was seen: 3,605 times

last updated: 15 Apr '15, 22:34

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum