others (#15) - How to handle roads which are temporarily not available? (#283) - Message List

How to handle roads which are temporarily not available?

Hi Every one! I am new to pgRouting, but before posting I have read the mailing list to see if some one has the same issue.

Any one knows how to handle roads which are not available temporarily e.g. some maintenance work is being carried on a section of road or in an earth quake situation where roads can get damaged.

How do I tell pgRouting not to select a specific section of the road?

Thanks

  • Message #1008

    In short: don't select them ;-)

    Long version:
    With pgRouting you can do all SQL allows you to do. For example

    SELECT * FROM shortest_path_shooting_star(
    	'SELECT gid as id, class_id, source, target, length*c.cost as cost,
    		x1, y1, x2, y2, rule, to_cost, reverse_cost*c.cost as reverse_cost
    	FROM ways w, classes c
    	WHERE class_id=c.id', 1955, 5787, true, true);
    

    from the workshop has a select that does some inner select in the function where you could add some additional "WHERE" statement.

    • Message #1010

      In short: thanks man!

      Long Version: I must Try it.