From 00f3f3f94dccf15b2b18fc6a8139ff3c9c3a2e7e Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 22 Dec 2016 23:21:01 -0500 Subject: [PATCH] [fix] now that neighborhood is classified at index construction time, no longer need to assume suburb for components that might otherwise be a city, etc. --- scripts/geodata/addresses/components.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/geodata/addresses/components.py b/scripts/geodata/addresses/components.py index 5ed66230..76c360a0 100644 --- a/scripts/geodata/addresses/components.py +++ b/scripts/geodata/addresses/components.py @@ -1000,7 +1000,7 @@ class AddressComponents(object): polygon_type = neighborhood.get('polygon_type') component = neighborhood.get('component') - neighborhood_level = AddressFormatter.SUBURB + neighborhood_level = component key, raw_key = self.pick_random_name_key(neighborhood, neighborhood_level, suffix=language_suffix) @@ -1008,8 +1008,6 @@ class AddressComponents(object): name = neighborhood.get(key, neighborhood.get(raw_key)) if component == AddressFormatter.CITY_DISTRICT: - neighborhood_level = AddressFormatter.CITY_DISTRICT - # Optimization so we don't use e.g. same name multiple times for suburb, city_district, city, etc. if not replace_city and name == city_name and (not standard_name or standard_name == city_name): continue