2

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

1

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

1

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)

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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