From ee8c070fd591ccb672b232a601d917dfd821e8f7 Mon Sep 17 00:00:00 2001 From: Al Date: Tue, 22 Nov 2016 11:22:26 -0500 Subject: [PATCH] [osm] override admin_level with other components in config if present --- scripts/geodata/osm/components.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/geodata/osm/components.py b/scripts/geodata/osm/components.py index 2973bb43..376ac445 100644 --- a/scripts/geodata/osm/components.py +++ b/scripts/geodata/osm/components.py @@ -148,6 +148,11 @@ class OSMAddressComponents(object): if containing_component is not None: return containing_component + if k != self.ADMIN_LEVEL and k in config: + containing_component = config.get(k, {}).get(v, None) + if containing_component: + return containing_component + # admin_level tags are mapped per country for k, v in values: containing_component = config.get(k, {}).get(v, None)