Avoid all highways listed in the avoid set
Even though the speeds are defined for a certain road class, routing should be avoided as it is listed in the `avoid set`.
This commit is contained in:
parent
659b470320
commit
b99d3a0a69
@ -356,6 +356,7 @@ function process_way(profile, way, result, relations)
|
||||
-- routable. this includes things like status=impassable,
|
||||
-- toll=yes and oneway=reversible
|
||||
WayHandlers.blocked_ways,
|
||||
WayHandlers.avoid_ways,
|
||||
|
||||
-- determine access status by checking our hierarchy of
|
||||
-- access tags, e.g: motorcar, motor_vehicle, vehicle
|
||||
|
@ -490,6 +490,15 @@ function WayHandlers.weights(profile,way,result,data)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- handle general avoid rules
|
||||
|
||||
function WayHandlers.avoid_ways(profile,way,result,data)
|
||||
if profile.avoid[data.highway] then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- handle various that can block access
|
||||
function WayHandlers.blocked_ways(profile,way,result,data)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user