Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On details page add link to country #41

Open
mtmail opened this issue Oct 28, 2020 · 4 comments
Open

On details page add link to country #41

mtmail opened this issue Oct 28, 2020 · 4 comments
Labels
waiting for Nominatim API change Nominatim API needs to add a feature first

Comments

@mtmail
Copy link
Collaborator

mtmail commented Oct 28, 2020

Example
https://nominatim.openstreetmap.org/ui/details.html?osmtype=R&osmid=2145268&class=boundary
in the address line lists has both 'Germany' and 'de' but no links to their OSM or detail pages.

The API doesn't return the ids but maybe we can still add a link in the UI, even if it goes to a search page.

    "address": [
        {
            "localname": "Bavaria",
            "place_id": 235644837,
            "osm_id": 2145268,
            "osm_type": "R",
            "place_type": "state",
            "class": "boundary",
            "type": "administrative",
            "admin_level": 4,
            "rank_address": 8,
            "distance": 0,
            "isaddress": true
        },
        {
            "localname": "Germany",
            "place_id": null,
            "osm_id": null,
            "osm_type": null,
            "place_type": null,
            "class": "place",
            "type": "country",
            "admin_level": null,
            "rank_address": 4,
            "distance": 0,
            "isaddress": true
        },
        {
            "localname": "de",
            "place_id": null,
            "osm_id": null,
            "osm_type": null,
            "place_type": null,
            "class": "place",
            "type": "country_code",
            "admin_level": null,
            "rank_address": 4,
            "distance": 0,
            "isaddress": false
        }
    ],
@lonvia
Copy link
Member

lonvia commented Oct 29, 2020

We don't have the information about the relevant object on the Nominatim side. The country is computed from the country code and the country_name table. I see two options here:

  1. Simply have a search link to the country as you suggested.
  2. Have a special version of the details page that displays the information from country_name (for names etc.), location_area_country (for the underlying geometry currently used by Nominatim) and links to all places with the given country code and rank_search = 2.

The latter would be really interesting but needs support from the Nominatim API.

@lonvia
Copy link
Member

lonvia commented Feb 23, 2021

See osm-search/Nominatim#1671 for the relevant Nominatim issue.

@mtmail mtmail added the waiting for Nominatim API change Nominatim API needs to add a feature first label Feb 25, 2021
@SachitSankhe
Copy link

Hi, is this issue still open? I am new to this so I have understood that the address table needs a OSM-link to the country we get from the country code. Am I right about this? Plz suggest how can I move forward if this issue still exists.

@mtmail
Copy link
Collaborator Author

mtmail commented Apr 15, 2022

I still prefer the (2) option in #41 (comment) and that requires a change to Nominatim API which hasn't been implemented yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for Nominatim API change Nominatim API needs to add a feature first
Projects
None yet
Development

No branches or pull requests

3 participants