Introduces a construction whitelist in profiles
This commit is contained in:
parent
48824c4c8a
commit
64e4b7eaa0
@ -70,6 +70,12 @@ function setup()
|
||||
|
||||
restricted_highway_whitelist = Set { },
|
||||
|
||||
construction_whitelist = Set {
|
||||
'no',
|
||||
'widening',
|
||||
'minor',
|
||||
},
|
||||
|
||||
access_tags_hierarchy = Sequence {
|
||||
'bicycle',
|
||||
'vehicle',
|
||||
|
@ -155,6 +155,12 @@ function setup()
|
||||
'living_street',
|
||||
},
|
||||
|
||||
construction_whitelist = Set {
|
||||
'no',
|
||||
'widening',
|
||||
'minor',
|
||||
},
|
||||
|
||||
route_speeds = {
|
||||
ferry = 5,
|
||||
shuttle_train = 10
|
||||
|
@ -57,6 +57,8 @@ function setup()
|
||||
|
||||
restricted_highway_whitelist = Set { },
|
||||
|
||||
construction_whitelist = Set {},
|
||||
|
||||
access_tags_hierarchy = Sequence {
|
||||
'foot',
|
||||
'access'
|
||||
|
@ -521,7 +521,7 @@ function WayHandlers.blocked_ways(profile,way,result,data)
|
||||
local construction = way:get_value_by_key('construction')
|
||||
|
||||
-- Of course there are negative tags to handle, too
|
||||
if construction and construction ~= 'no' and construction ~= 'widening' and construction ~= 'minor' then
|
||||
if construction and not profile.construction_whitelist[construction] then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user