Skip to content

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

Open

Description

@uwbas

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'];

Activity

  1. jbelien commented on May 27, 2022

    @jbelien
    Member

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

  2. uwbas commented on May 28, 2022

    @uwbas
    Author

    Done: #1156

  3. changed the title [-]Municipality not in list of 'localityFields'[/-] [+][Nominatim] Municipality not in list of 'localityFields'[/+] on May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions