custom-components / places

Component to integrate with OpenStreetMap Reverse Geocode (places)
GNU General Public License v3.0
110 stars 22 forks source link

Improve City, Postal Town and Neightbourhood logic #285

Closed Snuffy2 closed 3 months ago

Snuffy2 commented 3 months ago

Based on the OpenStreetMap wiki on the different steps of the place key: https://wiki.openstreetmap.org/wiki/Key:place

Finds the first of these OSM place keys that is set to use for the places city attribute: city, town, village, township, hamlet, city_district, municipality

Then finds the first of these OSM place keys that is set below the one used for city to use for the places postal_town attribute: city, town, village, township, hamlet, borough, suburb

Then finds the first of these OSM place keys that is set below the one used for postal_town to use for the places neighbourhood attribute: village, township, hamlet, borough, suburb, quarter, neighbourhood

Fixes #282