Basically I have I have a sets of nodes containing gps coordinates, How do I implement A* search in such I way that I can use this geopoints to compare them to each other and find the shortest path by assigning a distance from one point to the other.
Update: 01/11/12
I am trying to draw the shortest path route, attaining this by traversing each nodes by the said algorithm and compare the distances of the nodes traversed to find the shortest path. Another problem is that I cannot find the right A* search implementation in Android/Java. My problem right now are:
Since I will save the geopoint(nodes) of each intersection of the roads, like should i store it on array or link list?
Right now we were able to calculate the distance of each node but not dynamically. What should I do to use this in calculating for the shortest route using A* search.
Euclidean distance (i.e. straight-line distance) between two points may be a good heuristic function.
Find details on A* search on Wikipedia.
A* search is actually a modification of Dijkstra's algorithm for finding single source shortest path. The only difference is that A* search uses a heuristic function that guides the search, pruning unnecessary search tree branches. A good heuristic function should be designed in such a way that its value becomes monotonic along any search path. It should not overestimate the actual distance between two states. As euclidean distance is the least possible distance between two points, there's no chance of overestimation on distance between two points.
For more about euclidean distance, see here. For applying it on geo-coordinates, see here.