dijkstra (#16) - Using oriented graph and oneway edges (#13) - Message List

Using oriented graph and oneway edges

Hi, I'm trying to compute shortest path taking into account directed graph and oneway edges. My roads table contains such orientation information. I tried to reverse geometries whose direction is negative before building the graph.

When running: SELECT a.edge_id FROM shortest_path('SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM routes_hg_edges', 2176, 1294, true, true) AS a LEFT JOIN routes_hg ON vertex_id = gid;

The path is the same if I swap start and end vertices. (as if oneway were not taken into account).

How can I setup my graph to compute path taking into account oneway streets ?

Thank you

Nicolas

  • Message #47

    Forget my previous post. A closer look at my graph showed that oneway streets are taken into account...

    Sorry for the noise

    Nicolas

    • Message #48

      No problem, you are welcome!