Skip to content

Commit

Permalink
Introduces a construction whitelist in profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-j-h authored and TheMarex committed Jul 19, 2017
1 parent df0f407 commit 7eafb48
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions profiles/bicycle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ local profile = {

restricted_highway_whitelist = Set { },

construction_whitelist = Set {
'no',
'widening',
'minor',
},

access_tags_hierarchy = Sequence {
'bicycle',
'vehicle',
Expand Down
7 changes: 7 additions & 0 deletions profiles/car.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ local profile = {
'access'
},

construction_whitelist = Set {
'no',
'widening',
'minor',
},


service_tag_forbidden = Set {
'emergency_access'
},
Expand Down
2 changes: 2 additions & 0 deletions profiles/foot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ local profile = {

restricted_highway_whitelist = Set { },

construction_whitelist = Set {},

access_tags_hierarchy = Sequence {
'foot',
'access'
Expand Down
2 changes: 1 addition & 1 deletion profiles/lib/handlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ function Handlers.handle_blocked_ways(way,result,data,profile)
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
Expand Down

0 comments on commit 7eafb48

Please sign in to comment.