Skip to content

Search results are assigned to anachronistic countries #1403

Open

Description

@1ec5

The “address” or display name that Nominatim calculates for each result comes up with a country that is often anachronistic. For example, searching for “Cafe du Monde” turns up this American-brand café [2009 – 2011] supposedly located in the Empire of Japan [1920 – 1925]. (The empire’s name still has a date range in its name=* tag, which is incorrect, but at least it makes this bug more apparent.)

Search results for Cafe du Monde: Cafe Cafe du Monde, 11, Izumi Province, Kinai, 594-0041, Empire of Japan (1920-1925) [2009 – 2011]

Nominatim knows that this result is in Japan. For performance at admin level 2, it falls back to a country grid derived from OSM. This grid returns jp, which Nominatim then converts to a country and associates with a boundary relation for its names. Somewhere in this process, when we’re deciding which country to include in the address for a particular result, we would at least need to filter the results by a matching date in extratags. But it would be better to disable this country grid altogether, since it isn’t possible to make a distinct country grid for all the different country configurations over the course of history.

/ref #693 (comment)

Activity

  1. added theissue type on Jul 15, 2026
  2. 1ec5 commented on Jul 28, 2026

    @1ec5
    MemberAuthor

    osm-search/Nominatim#3516 says the country grid is only used for tie-breaking when a feature is in multiple overlapping admin_level=2 boundaries. (I think it also assumes every country has a country code, which is a larger problem.) We can add the check for matching dates to this SQL query.

  3. jeffreyameyer commented on Dec 3, 2026

    @jeffreyameyer
    Member

    Additional examples to use in testing (if necessary)

    Tenochtitlan

    This example is odd, because it's not clear to me how any Haiti boundary would enclose Tenochtitlan.

    Monosnap Tenochtitlan | OpenHistoricalMap — Original profile 2026-12-03 10-54-05

    Danzig

    This feels like a clearer example of what's going on in this ticket. The Carolingian Empire was definitely long gone by the dates shown at the end of the search results.

    Monosnap danzig | OpenHistoricalMap — Original profile 2026-12-03 10-58-35

    Cumberland County

    Here, several results are assigned to the "United States" before the United States existed. This result should be listed under the Colony of Pennsylvania.

    Monosnap cumberland county | OpenHistoricalMap — Original profile 2026-12-03 11-05-05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions