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

_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users

Reply via email to