Improving findability of human address strings with Nominatim

First thanx for all the data.

Here’s my problem: Users enter arbitrary address strings. From theses address strings I want to automatically show a map of the place. Without any manual editing.

So I ask Nomiatim to find the place and then draw the map.
nominatim/search?limit=1&format=json&q=" + encodeURIComponent( address_str_entered_by_user )

This works often. But often the map stays blank, even if the search string is reasonable or quite accurate. It seems Nomiatim is quite delicate (anal?) with the search term. Which is unfortunate, because most often the data is there, Nomiatim just pretends not to have it. Or I’m not asking the right search string.

For example the most famous Hotel in Berlin. The Adlon.

https://nominatim.openstreetmap.org/ui/search.html?q=Hotel+Adlon%2C+Unter+den+Linden+77%2C+10117+Berlin

https://nominatim.openstreetmap.org/ui/search.html?q=Adlon%2C+Unter+den+Linden+77%2C+10117+Berlin

Both are the most common address entries/searches. Both give no results.
Turns out the name OSM wants, is “Adlon Kempinski”
While Kempinski is technically correct, rarely will anybody use Kempinski as a search term for the Adlon.

  1. So what are some tipps and tricks to get an answer from Nomiatim, even if the search term isn’t perfectly in shape and just human? How to prepare the search term to get the most results? I also got a city and country field, but just adding these to the search term with commas seems to confuse Nomiatim even more.

  2. What I want to do:
    Every time the map stays blank I would add an alt_name to the node to make it more findable in Nomiatim.
    For the Adlon example
    alt_name=Hotel Adlon;Adlon
    Does this help and make sense?
    Or name=Adlon Kempinski;Hotel Adlon;Adlon ??

  3. Where can I find info on how Nomiatim tries to parse, understand, make sense of simple unstructured query strings? So I can tweak the human address string for a better understanding in Nomiatim.

  4. Are there any other open geocoding APIs besides Nomiatim?

thanx

There is also Photon from komoot: https://photon.komoot.io/ (GitHub - komoot/photon: an open source geocoder for openstreetmap data)

If you search for Adlon, Berlin you get a perfect match. So I don’t think it’s necessary to add those.

Nominatim currently has a problem with searches where the words have many transliterations into different languages. It basically ends up with too many variants to search to and gives up before hitting the right one. In your example is it tripped up by the many “translations” of Unter den Linden which are all simple transliterations. (The English version really makes me cringe. Does anyone ever use that?)

Anyway, just saying that Nominatim is simply buggy here. It should find the hotel under both search terms. Fix is planned but will need another month or two. If you want to track it, follow 2 Ulmenweg, Hildesheim not found · Issue #2855 · osm-search/Nominatim · GitHub

1 Like

Another option is just search the address: 77 Unter den linden, Berlin | OpenStreetMap - which for me, found the English translations, despite searching for the German wording?

This does, of course, depend on the actual street number being mapped in OSM, which IMHO, is the single biggest major problem OSM has, worldwide, with being considered as a valid mapping / navigation source :cry: