From 80a9c1b3080a3e4e87cb92c69263ac62681cb9e9 Mon Sep 17 00:00:00 2001 From: Al Date: Tue, 27 Dec 2016 04:19:57 -0500 Subject: [PATCH] [addresses] move country-specific cleanups to before reverse geocoding as those deal with the user-specified components --- scripts/geodata/addresses/components.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/geodata/addresses/components.py b/scripts/geodata/addresses/components.py index 7278143d..d8d9cafb 100644 --- a/scripts/geodata/addresses/components.py +++ b/scripts/geodata/addresses/components.py @@ -1610,6 +1610,8 @@ class AddressComponents(object): # If a country was already specified self.replace_country_name(address_components, country, non_local_language or language) + self.country_specific_cleanup(address_components, country) + self.add_admin_boundaries(address_components, osm_components, country, language, latitude, longitude, non_local_language=non_local_language, @@ -1623,7 +1625,6 @@ class AddressComponents(object): self.cleanup_street(address_components) self.cleanup_boundary_names(address_components) - self.country_specific_cleanup(address_components, country) language_altered = False if language_suffix and not non_local_language: