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 { },
|
restricted_highway_whitelist = Set { },
|
||||||
|
|
||||||
|
construction_whitelist = Set {
|
||||||
|
'no',
|
||||||
|
'widening',
|
||||||
|
'minor',
|
||||||
|
},
|
||||||
|
|
||||||
access_tags_hierarchy = Sequence {
|
access_tags_hierarchy = Sequence {
|
||||||
'bicycle',
|
'bicycle',
|
||||||
'vehicle',
|
'vehicle',
|
||||||
|
@ -155,6 +155,12 @@ function setup()
|
|||||||
'living_street',
|
'living_street',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
construction_whitelist = Set {
|
||||||
|
'no',
|
||||||
|
'widening',
|
||||||
|
'minor',
|
||||||
|
},
|
||||||
|
|
||||||
route_speeds = {
|
route_speeds = {
|
||||||
ferry = 5,
|
ferry = 5,
|
||||||
shuttle_train = 10
|
shuttle_train = 10
|
||||||
|
@ -57,6 +57,8 @@ function setup()
|
|||||||
|
|
||||||
restricted_highway_whitelist = Set { },
|
restricted_highway_whitelist = Set { },
|
||||||
|
|
||||||
|
construction_whitelist = Set {},
|
||||||
|
|
||||||
access_tags_hierarchy = Sequence {
|
access_tags_hierarchy = Sequence {
|
||||||
'foot',
|
'foot',
|
||||||
'access'
|
'access'
|
||||||
|
@ -521,7 +521,7 @@ function WayHandlers.blocked_ways(profile,way,result,data)
|
|||||||
local construction = way:get_value_by_key('construction')
|
local construction = way:get_value_by_key('construction')
|
||||||
|
|
||||||
-- Of course there are negative tags to handle, too
|
-- 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
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user