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

[Nominatim] Municipality not in list of 'localityFields' #1155

Open
uwbas opened this issue May 14, 2022 · 2 comments
Open

[Nominatim] Municipality not in list of 'localityFields' #1155

uwbas opened this issue May 14, 2022 · 2 comments

Comments

@uwbas
Copy link

uwbas commented May 14, 2022

I came across some reverse geocoding results where Nominatim.php didn't return a 'locality'. In my opinion, this latlng query should have 'Purmerend' as its locality, as it's the municipal boundary:

https://nominatim.openstreetmap.org/ui/reverse.html?lat=52.50741&lon=4.93279&zoom=18
https://nominatim.openstreetmap.org/ui/details.html?osmtype=W&osmid=6593763&class=highway

Upon debugging, I noticed that inside jsonResultToLocation(), on line 209, 'municipality' was not considered a 'locality'.

$localityFields = ['city', 'town', 'village', 'hamlet'];

Is this a matter of definition?

Adding 'municipality' fixes my issue:

$localityFields = ['city', 'town', 'village', 'hamlet', 'municipality'];

@jbelien
Copy link
Member

jbelien commented May 27, 2022

Hello @uwbas ,
That seems indeed to be a valid point!
Could you submit a PR with that change ?
Thanks.

@uwbas
Copy link
Author

uwbas commented May 28, 2022

Done: #1156

@jbelien jbelien changed the title Municipality not in list of 'localityFields' [Nominatim] Municipality not in list of 'localityFields' May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants