[openstreetmap/openstreetmap-website] Label administrative boundaries by real-world designation (PR #5493)

Minh Nguyễn notifications at github.com
Sun Jan 12 00:58:09 UTC 2025


Search results for Nominatim and Overpass queries now label administrative boundaries according to the real-world designation according to the `border_type=*` tag. If the value of this tag is unrecognized, the label falls back to a more generic “Administrative Boundary (Level _n_)”, where _n_ is the `admin_level=*` value. The English localization no longer attempts to translate these administrative levels to a fictional country’s administrative hierarchy.

<table>
<thead>
<tr>
<th>Before</th><th>After</th>
</tr>
</thead>
<tbody>
<tr></tr>
<tr>
<td>

[<img src="https://github.com/user-attachments/assets/591d07d6-8a05-41f1-95df-b5825b54ef9f" width="300" alt="County Boundary, City Boundary, Municipality Boundary, County Boundary, Country Boundary, City Boundary, State Boundary">](https://www.openstreetmap.org/query?lat=39.252971&lon=-84.281251#map=18/39.253109/-84.280527)

</td>
<td>

[<img src="https://github.com/user-attachments/assets/c40b753d-a164-43e2-badc-0ed0213cb290" width="300" alt="County Boundary, City Boundary, Township Boundary, County Boundary, International Boundary, City Boundary, State Boundary">](http://0.0.0.0:3000/query?lat=39.252971&lon=-84.281251#map=18/39.253109/-84.280527)

</td>

</tr>
<tr></tr>
<tr>
<td>

[<img src="https://github.com/user-attachments/assets/c48197d5-43b5-423e-a39e-6d7e9e142f3b" width="300" alt="County Boundary, State Boundary, Country Boundary, Municipality Boundary, Country Boundary, City Boundary, County Boundary, Municipality Boundary, Region Boundary">](https://www.openstreetmap.org/query?lat=43.068068&lon=-79.019396#map=18/43.068339/-79.018591)

</td>
<td>

[<img src="https://github.com/user-attachments/assets/c15c8e21-76ec-46d4-80cc-6eed54a845a6" width="300" alt="County Boundary, State Boundary, Provincial Boundary, International Boundary, Administrative Bounary (Level 8), Administrative Boundary (Level 6), Town Boundary, Administrative Boundary (Level 5)">](http://0.0.0.0:3000/query?lat=43.068068&lon=-79.019396#map=18/43.068339/-79.018591)

</td>
</tr>
<tr></tr>
<tr>
<td>

[<img src="https://github.com/user-attachments/assets/aaf83f07-9c72-4452-91ed-61f8006ec504" width="300" alt="County, City, Hamlet, City, County, City, County, City, County">](https://www.openstreetmap.org/search?query=Hamilton#map=11/39.1673/-84.5384)

</td>
<td>

[<img src="https://github.com/user-attachments/assets/2483be9a-e647-4d84-b411-585607d55386" width="300" alt="County, City, Hamlet, City, County, City, County, City, County">](http://0.0.0.0:3000/search?query=Hamilton#map=11/39.1673/-84.5384)

</td>
</tr>
</tbody>
</table>

There are [many tagging schemes](https://wiki.openstreetmap.org/wiki/Key:border_type#Alternatives) for the real-world designation, each with their advantages and disadvantages, but I focused on `border_type=*` for now because it’s the most common scheme globally.

Fixes #5450.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5493

-- Commit Summary --

  * Label administrative boundaries by level
  * Level 2 is always an international boundary
  * Label boundaries by regional official designations

-- File Changes --

    M app/assets/javascripts/index/query.js (8)
    M app/controllers/geocoder_controller.rb (6)
    M config/locales/en.yml (47)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5493.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5493.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5493
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5493 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250111/c14e320e/attachment-0001.htm>


More information about the rails-dev mailing list