|
Hi all: I have a few
questions about pgdijkstra module. I have posted the
questions before. Since nobody responses my questions, I re-post them again. 1. If I pass directed =true to shortest_path function, which means all road segments have
directions? Can I set highways which need to be considerate direction
(one-way), and local roads have no directions (two-way) in one route? You know,
in real life, you can drive on one-way and two-way street in one trip. The
route is a combination of one-way and two-way roads. 2. Another question about direction. Do traffic directions
have to match road segment direction? For example, a road segment start node id
is 4, and end node id is 5, but traffic direction is actually from Node 5 to
Node 4. Does shortest_path function support this
situation? How? Do I have to flip one-way road segments to match traffic
direction? 3. The algorithm optimize route based on cost, not the length
of segment 4. When 2 edge share start point and end point, create_graph_tables cannot process them and crash with an
error. In order to run the function, according to CarcoWeb User Manual (PartII.
User Manual, 1.2.4.2.2, graph importation), I need to delete the edges which
share start/end points from the table. I don’t think it is right. The attachment show
two edges (red and blue) share start point and end point. There is nothing
wrong with them. But create_graph_tables cannot
assign edge id for them. They have same start point and end points, create_graph_tables cannot treat them as two different
edges. Did I miss something? 5. 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 |
<<attachment: edgesShareStEndPts.JPG>>
_______________________________________________ Cartoweb-users mailing list [email protected] http://lists.maptools.org/mailman/listinfo/cartoweb-users
