Skip to content

Commit 7eafb48

Browse files
daniel-j-hTheMarex
authored andcommitted
Introduces a construction whitelist in profiles
1 parent df0f407 commit 7eafb48

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

profiles/bicycle.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ local profile = {
7272

7373
restricted_highway_whitelist = Set { },
7474

75+
construction_whitelist = Set {
76+
'no',
77+
'widening',
78+
'minor',
79+
},
80+
7581
access_tags_hierarchy = Sequence {
7682
'bicycle',
7783
'vehicle',

profiles/car.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ local profile = {
9494
'access'
9595
},
9696

97+
construction_whitelist = Set {
98+
'no',
99+
'widening',
100+
'minor',
101+
},
102+
103+
97104
service_tag_forbidden = Set {
98105
'emergency_access'
99106
},

profiles/foot.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ local profile = {
6161

6262
restricted_highway_whitelist = Set { },
6363

64+
construction_whitelist = Set {},
65+
6466
access_tags_hierarchy = Sequence {
6567
'foot',
6668
'access'

profiles/lib/handlers.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ function Handlers.handle_blocked_ways(way,result,data,profile)
520520
local construction = way:get_value_by_key('construction')
521521

522522
-- Of course there are negative tags to handle, too
523-
if construction and construction ~= 'no' and construction ~= 'widening' and construction ~= 'minor' then
523+
if construction and not profile.construction_whitelist[construction] then
524524
return false
525525
end
526526
end

0 commit comments

Comments
 (0)