Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postal Town regularly not populated #282

Closed
jimmyfitz opened this issue Jun 1, 2024 · 2 comments · Fixed by #285
Closed

Postal Town regularly not populated #282

jimmyfitz opened this issue Jun 1, 2024 · 2 comments · Fixed by #285
Assignees
Labels
bug Something isn't working

Comments

@jimmyfitz
Copy link

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

@Snuffy2 Snuffy2 self-assigned this Jun 1, 2024
@Snuffy2 Snuffy2 added the bug Something isn't working label Jun 1, 2024
@Snuffy2
Copy link
Collaborator

Snuffy2 commented Jun 2, 2024

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

Parramatta:
https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=-33.80987&lon=151.00421&addressdetails=1&namedetails=1&zoom=18&limit=1

Oatlands:
https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=-33.79316&lon=151.024912&addressdetails=1&namedetails=1&zoom=18&limit=1

@Snuffy2
Copy link
Collaborator

Snuffy2 commented Jun 2, 2024

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

https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=-33.80987&lon=151.00421&addressdetails=1&namedetails=1&zoom=18&limit=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants