[Nominatim] Municipality not in list of 'localityFields'
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 52/100
Research direction
Start in Nominatim.php at jsonResultToLocation(), around line 209, and inspect how localityFields are used for the supplied reverse-geocoding result. Confirm that the municipality value from the Purmerend example is returned as locality, and verify the existing behavior remains correct for the other listed locality fields.
Written by the indexing model from the issue text.
Description
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'];
- Dominant language
- PHP
- Stars
- 4k
- Forks
- 525
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from geocoder-php/Geocoder
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
geocoder-php/Geocoder#1272 ·
-
question
Difficulty 4/5 3-5 days Newbie friendliness 25/100
geocoder-php/Geocoder#1267 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
geocoder-php/Geocoder#1266 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 38/100
geocoder-php/Geocoder#1244 · 2 comments · 2 reactions ·
-
provider
Difficulty 4/5 3-5 days Newbie friendliness 30/100
geocoder-php/Geocoder#1243 ·
All issues in geocoder-php/Geocoder
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·