Skip to content

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

Open
@uwbas

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

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