Closed jimmyfitz closed 3 months ago
Can you provide a couple more example GPS coordinates where this isn't working. Ideally not in Parramatta.
This is because in OpenSteetMaps (OSM), this location has City defined as Sydney and then Town defined as Parramatta (see url below). Currently, the logic sets the places city attribute to the first one of these it finds: city, town, village, township, municipality, city_district. Then it sets the places postal_town attribute to the first one these it finds: suburb, city_district. Looking nearby in Oatlands, the Oatlands is set as Suburb and not Town (see url below).
Looking at the formatted address created by OSM and from what you're seeing, I need to refine the logic for postal_town. But, I want to ensure I don't break other locations nor do I want city and postal_town to show the same thing (unless appropriate).
I think in the Parramatta example, whoever set the details in OpenStreetMap, incorrectly set Parramatta as a Town instead of Suburb. #285 will catch this, but I need to do some more testing to ensure it doesn't also break other addresses.
You can also go in and edit OpenStreetMap to change Parramatta from a town to a suburb. https://wiki.openstreetmap.org/wiki/Tag:place%3Dsuburb https://wiki.openstreetmap.org/wiki/Tag:place%3Dtown
There are a bunch of situations where Places doesn't create or populate Postal Town. I'd assumed that this is because the location doesn't know a suburb... but that's not the case because the formatted address includes the Postal Town. I'm guessing the root cause is when place type = unclassified, however it still seems like a bug not populating the Postal Town field.![image](https://github.com/custom-components/places/assets/35523454/6c470b12-ace8-4e3e-a8a2-c8b9fea001c9)