geocoder-php / geocoder-php/Geocoder
[Nominatim] Municipality not in list of 'localityFields'
まだ誰も着手していません。
- 主要言語
- PHP
- スター
- 4k
- フォーク
- 525
- 平均マージ
- 8分
- マージ済み PR(30日)
- 1
説明
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'];
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Nominatim.php の jsonResultToLocation()(209 行目付近)から始め、提供された reverse-geocoding 結果に対して localityFields がどのように使用されているかを確認してください。Purmerend の例の municipality 値が locality として返されることを確認し、リストされている他の locality フィールドについても既存の動作が引き続き正しいことを検証してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 52/100