Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

In PostGIS I have two tables: an osm road network and a table that contains the start and end coordinate points of each path (i.e. userid, start_x1, start_y1, end_x2, end_y2). I would like to know: 1) how to create an osm road network that can be used for implementing the Astart algorithm with pgrouting (I actually have an osm road network which I obtained using osm2po and that works fine Dijkstra shortest path algorithm using pgrouting layer plugin) 2) how to find the shortest path of each start and end coordinate points using A-star. Thank you, Selini

share|improve this question
add comment

2 Answers

Have you read the pgRouting workshop chapter about A-Star? It should answer your questions.

share|improve this answer
add comment

You can use, in a smart way, some of the postgis geometry relationship functions to find the nearest node to the given point coordinates, and then make use of the pgrouting functions (shortest_path, shortest_path_astar, etc)

share|improve this answer
    
Thank you. In this regard, I found this post: gis.stackexchange.com/questions/6978/… –  selini Sep 6 '12 at 10:11
    
but it was not really clear to me.could you please let me know where I else I could read about the function to find the nearest node and/or lyne to the given point coordinate? –  selini Sep 6 '12 at 10:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.