[Cartoweb-users] confused by reverse cost in pgdijkstra

Fay Du fay.du at versaterm.com
Fri Jan 13 11:15:12 EST 2006


Hi all:
I am very confused by reverse cost in pgdijkstra.
 
I run against sample data (roads_europe). 
 
1) Calculate from node 27 to node 19. Set has_reverse_cost to true and
set the graph is directed.
SELECT * FROM shortest_path('SELECT id, source, target, cost,
reverse_cost FROM roads_europe_edges',  27, 19, true, true);
It returned 47 rows
 
2) Calculate from node 19 to node 27. Set has_reverse_cost to false and
set the graph is directed.
SELECT * FROM shortest_path('SELECT id, source, target, cost FROM
roads_europe_edges', 
         19, 27, true, false);
It returned a message: no path found.
 
If second statement cannot return a path, how the first statement can
calculate reverse cost?
 
Thanks for any help.
Fay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20060113/f7bc4fba/attachment.html


More information about the Cartoweb-users mailing list