[pgrouting-users] Shortest path with Dijkstra going through a set of points

Tao Romera Martinez taoromera at gmail.com
Sat Sep 8 21:24:19 PDT 2012


Dear all,

I am using shortest_path() to find the shortest route between 2
points. I have a set of points (P1, P2, P3, P4...) through which I
want to go in order to reach the start and end points (S and E). Right
now, I am calling shortest_path() to link each pair of points
separately (S-P1, P1-P2, P2-P3, ...). The function shortest_path()
computes in 0.3 seconds, but since I have to call it many times, the
total time required to generate the final route gets quite high.

Does someone know how I could speed up the generation of the final
route (ie., the route going through all the points)? Is there a way of
calling shortest_path but with "via" points?

Thanks in advance for your help,

Tao


More information about the Pgrouting-users mailing list