From 2a9185874ade22d8ad5f88a42b616dff3c79fb45 Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 24 Jul 2016 21:55:02 -0400 Subject: [PATCH] [fix] component index --- scripts/geodata/osm/formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/geodata/osm/formatter.py b/scripts/geodata/osm/formatter.py index 1a7ba086..97401dae 100644 --- a/scripts/geodata/osm/formatter.py +++ b/scripts/geodata/osm/formatter.py @@ -387,7 +387,7 @@ class OSMAddressFormatter(object): if component_index: osm_components = [c for i, c in enumerate(osm_components) - if self.boundary_component_priorities.get(osm_address_components.component_from_properties(country, c, containing=containing_ids[i:]), -1) >= component_index and + if self.boundary_component_priorities.get(osm_address_components.component_from_properties(country, c, containing=containing_ids[i + 1:]), -1) >= component_index and (c['type'], c['id']) != (tags['type'], tags['id'])] # Do addr:postcode, postcode, postal_code, etc.