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

Reverse geocoding fails when no admin_level=2 boundary #3595

Open
woodpeck opened this issue Nov 20, 2024 · 0 comments
Open

Reverse geocoding fails when no admin_level=2 boundary #3595

woodpeck opened this issue Nov 20, 2024 · 0 comments

Comments

@woodpeck
Copy link
Contributor

What did you search for?

Attempted to reverse geocode a coordinate pair in Anguilla this morning, using a query that used to work earlier (and works again at the time of writing):

https://nominatim.openstreetmap.org/reverse?format=jsonv2&accept-language=en-US&lat=18.1954947&lon=-63.0750234&zoom=3

What result did you get?

HTTP 200 OK / "Unable to Geocode"

What result did you expect?

{"place_id":389565794,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright","osm_type":"relation","osm_id":2177161,"lat":"18.1954947","lon":"-63.0750234","category":"boundary","type":"administrative","place_rank":4,"importance":0.6366581903890984,"addresstype":"country","name":"Anguilla","display_name":"Anguilla","address":{"country":"Anguilla","country_code":"ai"},"boundingbox":["18.0615454","18.7951194","-63.6391992","-62.7125449"]}

Further details

The reason was that someone had downgraded Anguilla to admin_level=3 in https://www.openstreetmap.org/relation/2177161/history/24 which prevented Nominatim from returning anything.

It would be good if there was some safety net that would catch such "overseas territories" cases and not return an error. (Arguably, apart from international waters there probably shouldn't be anything on the world that is not inside an admin_level=2 but things like this will happen.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant