Discards construction and proposed ways, resolves #4230

This commit is contained in:
Daniel J. Hofmann
2017-07-08 18:49:01 +02:00
parent 175d27691d
commit 6a555a477b
6 changed files with 53 additions and 3 deletions
+2 -1
View File
@@ -189,7 +189,8 @@ local profile = {
avoid = Set {
'impassable',
'construction'
'construction',
'proposed'
}
}
+3 -1
View File
@@ -110,7 +110,9 @@ local profile = {
'reversible',
'impassable',
'hov_lanes',
'steps'
'steps',
'construction',
'proposed'
},
speeds = Sequence {
+3 -1
View File
@@ -76,7 +76,9 @@ local profile = {
},
avoid = Set {
'impassable'
'impassable',
'construction',
'proposed'
},
speeds = Sequence {
+19
View File
@@ -513,6 +513,25 @@ function Handlers.handle_blocked_ways(way,result,data,profile)
return false
end
-- In addition to the highway=construction tag above handle the construction=* tag
-- http://wiki.openstreetmap.org/wiki/Key:construction
-- https://taginfo.openstreetmap.org/keys/construction#values
if profile.avoid.construction then
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' then
return false
end
end
-- Not only are there multiple construction tags there is also a proposed=* tag.
-- http://wiki.openstreetmap.org/wiki/Key:proposed
-- https://taginfo.openstreetmap.org/keys/proposed#values
if profile.avoid.proposed and way:get_value_by_key('proposed') then
return false
end
-- Reversible oneways change direction with low frequency (think twice a day):
-- do not route over these at all at the moment because of time dependence.
-- Note: alternating (high frequency) oneways are handled below with penalty.