Introduces a construction whitelist in profiles

This commit is contained in:
Daniel J. Hofmann 2017-07-19 15:33:19 +02:00 committed by Patrick Niklaus
parent 48824c4c8a
commit 64e4b7eaa0
4 changed files with 15 additions and 1 deletions

View File

@ -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',

View File

@ -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

View File

@ -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'

View File

@ -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