[pgrouting-users] ordering of route edges?

Madison Shaw madisonshaw at googlemail.com
Mon Nov 29 13:24:17 EST 2010

Hi There,

I was wondering if someone could help me.  I have pgrouting working
and producing routes using both Dijkstra and AStar, but the edges that
are returned by the SQL are in the wrong order... not the order of the
edges as you expect to move through the route from start to finish...

eg: (using a short example)

If I have a route of ten edges, from start edge 1 to finish edge 10 -
I would expect the results to be: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (using
the id column that is returned from the sql)

However, the results are more like 3, 6, 2, 8, 1, 9, 4, 7, 10, 5.

Is this supposed to happen? Is there a way to return the results in
the order you traverse through the route?



More information about the Pgrouting-users mailing list