Import oneway roads from implicit tags

This commit is contained in:
Paul Bienkowski 2021-11-13 02:17:29 +01:00
parent 07ec5b40a0
commit 32e86be1d1

View file

@ -92,9 +92,10 @@ function osm2pgsql.process_way(object)
end end
local directionality = 0 local directionality = 0
if contains(ONEWAY_YES, tags["oneway"]) then -- See https://wiki.openstreetmap.org/wiki/Key:oneway section "Implied oneway restriction"
if contains(ONEWAY_YES, tags.oneway) or tags.junction == "roundabout" or zone == "motorway" then
directionality = 1 directionality = 1
elseif contains(ONEWAY_REVERSE, tags["oneway"]) then elseif contains(ONEWAY_REVERSE, tags.oneway) then
directionality = -1 directionality = -1
end end