From 87634a36e1c20eca2997102b5e98bf1e8b59e455 Mon Sep 17 00:00:00 2001 From: Al Date: Fri, 25 Nov 2016 00:56:38 -0800 Subject: [PATCH] [openaddresses] for cases where city populations are not known (i.e. not getting boundaries from OSM, most of the sources in OpenAddresses), place-only records should have at least two identifying components. Helps when city names, etc. are highly ambiguous and need to be qualified --- scripts/geodata/openaddresses/formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/geodata/openaddresses/formatter.py b/scripts/geodata/openaddresses/formatter.py index 3822f899..7c423f3b 100644 --- a/scripts/geodata/openaddresses/formatter.py +++ b/scripts/geodata/openaddresses/formatter.py @@ -481,7 +481,7 @@ class OpenAddressesFormatter(object): if rand_val < place_and_postcode_probability: components = self.components.drop_postcode(components) - if components: + if components and (len(components) > 1 or add_osm_boundaries): formatted = self.formatter.format_address(components, country, language=language, minimal_only=False, tag_components=tag_components) yield (language, country, formatted)