[openstreetmap/openstreetmap-website] admin_level in search results sometimes off by one (Issue #6870)
Sarah Hoffmann
notifications at github.com
Sat Mar 7 21:19:37 UTC 2026
lonvia left a comment (openstreetmap/openstreetmap-website#6870)
You are looking at the wrong piece of code. The relevant part for Nominatim search is
https://github.com/openstreetmap/openstreetmap-website/blob/bfa93794a6be5d02b3a9b024de8b88efd212e024/app/controllers/searches/nominatim_queries_controller.rb#L36
Not withstanding that `place_rank` should be used here rather than `address_rank`, it still wouldn't work for the Netherlands because Nominatim [fiddles with the ranks in that country](https://github.com/osm-search/Nominatim/blob/d43e95f177040ed98c4d6aeddb9bc24d149b39c7/settings/address-levels.json#L198).
Long story short, to fix this a) Nominatim should be changed to add the `admin_level` to the extra tags for boundaries and b) the websites then needs to be changed to use the admin_level from the extratags instead of making a guess from the ranks.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6870#issuecomment-4017396218
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/6870/4017396218 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260307/9d7a8970/attachment.htm>
More information about the rails-dev
mailing list