[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

This commit is contained in:
Al
2016-11-25 00:56:38 -08:00
parent 5118bbc6b9
commit 87634a36e1

View File

@@ -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)