Conditional oneway restrictions

This commit is contained in:
Lev Dragunov 2017-02-16 15:29:24 +03:00 committed by Patrick Niklaus
parent e52a8e060b
commit 67ae86882a

View File

@ -397,6 +397,11 @@ function Handlers.handle_oneway(way,result,data,profile)
oneway = Tags.get_value_by_prefixed_sequence(way,profile.restrictions,'oneway') or way:get_value_by_key("oneway")
elseif profile.oneway_handling == 'specific' then
oneway = Tags.get_value_by_prefixed_sequence(way,profile.restrictions,'oneway')
elseif profile.oneway_handling == 'conditional' then
oneway = Tags.get_value_by_prefixed_sequence(way,profile.restrictions,'oneway') or way:get_value_by_key("oneway")
if way:get_value_by_key("oneway:conditional") then
oneway = "no"
end
end
data.oneway = oneway