pgRouting

Forum #23 - Topic #38 - Message List

Barriers / Closed Edges

I attempted to search the discussion forum for information regarding barriers and closed edges (closed roads). Is there a recommended practice for closing edges for routing (road construction, bridge out, etc.). My initial assessment is that I'd have to modify the cost of the edge but am wondering if there's a less intrusive way of doing this so I wouldn't require a mechanism for storing the initial cost to restore it at some point in the future. Thanks in advance.

  • Message #145

    Hi, You can try to use Shooting* and assign high edge-to-edge passage cost from other edge(s) to the closed one. In this case you can keep original cost.

    Look at the first example at the ShootingStar wiki page.

    • Message #146

      Thanks, that should work for now. However, I was hoping there may be some way to define closure points and have the routing avoid those closure points. This is important because:

      Lets say that we allow a user to define the location of a bridge that has been washed away. This bridge just happens to be near the middle of an edge. Where do we set the restriction? The present state of things allows us to close the edge at the source_id OR the target_id or at both the source_id AND the target_id. It is probably irresponsible to assign the high restriction at only one of the ends so we would most likely set the restriction on both ends.

      Now... I live somewhere along this segment of road and I call for emergency assistance (911). If both the source_id and target_id have a high restriction and either end looks like an acceptable entry point (albeit with a high cost of entry) we may be potentially directing an emergency responder up to a bridge which would prevent them from accessing my home, which is on the other side of the bridge. They would have to turn around and go other way.

      I don't know if I explained the issue sufficiently enough. If not I can try to draw it out. Thanks!

      • Message #147

        As I was re-reading my post I began to anticipate that the answer to my question would be... pgRouting doesn't route to a location "along" an edge. Fair enough. However it would be possible to define an end point, route to both the source and target of the edge where the end location is closest to, determine the lowest cost for each, route to that vertex id and then proceed along the target edge. It would be necessary to draw my own graphic "along" the edge. I anticipate that all this is possible, with the exception of knowing which end to come in from in the case of a washed out bridge. Thanks again!

      • Message #148