Blacklist steps from the car profile
This commit is contained in:
parent
ef4d32a492
commit
ae835cc04f
@ -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 |
|
||||
|
||||
|
@ -91,7 +91,8 @@ local profile = {
|
||||
'toll',
|
||||
'reversible',
|
||||
'impassable',
|
||||
'hov_lanes'
|
||||
'hov_lanes',
|
||||
'steps'
|
||||
},
|
||||
|
||||
speeds = Sequence {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user