Blacklist steps from the car profile

This commit is contained in:
Patrick Niklaus 2017-02-07 11:03:48 +00:00 committed by Patrick Niklaus
parent ef4d32a492
commit ae835cc04f
3 changed files with 15 additions and 1 deletions

View File

@ -256,3 +256,11 @@ Feature: Car - Restricted access
| highway | motor_vehicle | motor_vehicle:forward | motor_vehicle:backward | forw | backw |
| footway | | | destination | | x |
| track | destination;agricultural | destination | | x | x |
Scenario: Car - Don't route over steps even if marked as accessible
Then routability should be
| highway | access | forw | backw |
| steps | yes | | |
| steps | no | | |
| primary | | x | x |

View File

@ -91,7 +91,8 @@ local profile = {
'toll',
'reversible',
'impassable',
'hov_lanes'
'hov_lanes',
'steps'
},
speeds = Sequence {

View File

@ -437,6 +437,11 @@ function Handlers.handle_blocked_ways(way,result,data,profile)
return false
end
-- don't route over steps
if profile.avoid.steps and data.highway == "steps" then
return false
end
-- construction
-- TODO if highway is valid then we shouldn't check railway, and vica versa
if profile.avoid.construction and (data.highway == 'construction' or way:get_value_by_key('railway') == 'construction') then