From 32e86be1d1448ea8f79d5c4ed5ff85a42459c24c Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Sat, 13 Nov 2021 02:17:29 +0100 Subject: [PATCH] Import oneway roads from implicit tags --- api/roads_import.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/roads_import.lua b/api/roads_import.lua index c089d58..6d37f07 100644 --- a/api/roads_import.lua +++ b/api/roads_import.lua @@ -92,9 +92,10 @@ function osm2pgsql.process_way(object) end 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 - elseif contains(ONEWAY_REVERSE, tags["oneway"]) then + elseif contains(ONEWAY_REVERSE, tags.oneway) then directionality = -1 end