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

Postbox refs with full address leads to empty search results #2652

Open
c-holtermann opened this issue Mar 30, 2022 · 3 comments
Open

Postbox refs with full address leads to empty search results #2652

c-holtermann opened this issue Mar 30, 2022 · 3 comments

Comments

@c-holtermann
Copy link

c-holtermann commented Mar 30, 2022

What did you search for?

Different cities in germany with a parenthesis in the name.

  1. "21423 Winsen (Luhe) Bahnhofstraße 2".

https://www.openstreetmap.org/search?query=21423%20Winsen%20(Luhe)%20Bahnhofstra%C3%9Fe%202#map=19/53.36028/10.20633

  1. "29456 Hitzacker (Elbe) Gelderländer Straße 12"

https://www.openstreetmap.org/search?query=29456%20Hitzacker%20(Elbe)%20Gelderl%C3%A4nder%20Stra%C3%9Fe%2012#map=19/53.36028/10.20633

  1. "21423 Winsen (Luhe) Friedrich-Lichtenauer-Allee 1"

https://www.openstreetmap.org/search?query=%2721423%20Winsen%20(Luhe)%20Friedrich-Lichtenauer-Allee%201%27#map=19/53.35054/10.20039

What result did you get?

None.

What result did you expect?

  1. https://www.openstreetmap.org/way/96068117
  2. https://www.openstreetmap.org/way/277522980
  3. Multiple, i.e. https://www.openstreetmap.org/way/65085011

Further details

  1. addr:city of the mentioned result actually contains the full name of the city which is "Winsen (Luhe)".

The result is successful when omitting the parenthesis:

https://www.openstreetmap.org/search?query=%2721423%20Winsen%20Bahnhofstra%C3%9Fe%202%27#map=19/53.36028/10.20633

The search is also successful when putting the house number in front of the street name (which is not a valid way to format an address in germany):

https://www.openstreetmap.org/search?query=%2721423%20Winsen%20(Luhe)%202%20Bahnhofstra%C3%9Fe%27#map=19/53.36028/10.20633

Weirdly searching for housenumber 4 leads to the correct result:

https://www.openstreetmap.org/search?query=%2721423%20Winsen%20(Luhe)%20Bahnhofstra%C3%9Fe%204%27#map=19/53.36010/10.20639

The datasets for housenumbers 2 (https://www.openstreetmap.org/way/96068117) and 4 (https://www.openstreetmap.org/way/96068115) are identical.

  1. The region (https://www.openstreetmap.org/relation/1821294) has the name Hitzacker with a name:suffix (Elbe)

  2. like 1

@c-holtermann c-holtermann changed the title Parenthesis in City names in germany leads to empty results Parenthesis in City names in germany leads to empty results (especially when in name:suffix) Mar 30, 2022
@lonvia
Copy link
Member

lonvia commented Mar 30, 2022

Paranthesis have nothing to do with it.

The first issue is easily fixed by placing strategic commas, e.g.:
https://nominatim.openstreetmap.org/ui/search.html?q=21423%2C+Winsen+%28Luhe%29+Bahnhofstra%C3%9Fe+2
(For reference, the reason Nominatim is thrown off is the odd ref mapping of postboxes in Winsen(Luhe), e.g. https://www.openstreetmap.org/node/2948710055. In the long run, Nominatim needs to detect those bogus refs and drop them.)

The second issue is a data issue: for Hitzacker, the name with suffix "(Elbe)" is missing. I see it is there on the place node, so #2637 will have fixed the issue already. Just needed a data update.

@c-holtermann
Copy link
Author

c-holtermann commented Mar 31, 2022

Thank you for your reply @lonvia!

  1. Unfortunately I cannot change the way the adress gets searched just now. I'd be happy to set a comma but I don't have access to the source code.

Could you elaborate on the ref problem?

Btw. I found another address that does not get found even though the house exists: '31542 Bad Nenndorf Bahnhofstraße 28'. Do you know why? Strategic comma helps as well but is out of my reach.

  1. Actually works now

@lonvia
Copy link
Member

lonvia commented Apr 6, 2022

Could you elaborate on the ref problem?

If you don't put commas into your query, Nominatim needs to determine the word boundaries by itself. It does so by looking into its database for all the full names, i.e. all what can be found in name tags in OSM. Normally that works well. '21423' is mapped as a postcode, 'Winsen(Luhe)' the name of the town etc. So the splitting into words is more or less obvious. But when objects are added that put a name combination in one of the name tags (including ref), there is suddenly an explosion of combinations, how the query can be split. Nominatim doesn't go through all of them but for performance reasons gives up before it gets to the right solution. It's a shortcoming in Nominatim and can (and eventually needs) to be improved. Trying to fix that on the data side would be fighting wind mills.

I found another address that does not get found even though the house exists: '31542 Bad Nenndorf Bahnhofstraße 28'.

Similar problem with a bus stop.

@lonvia lonvia changed the title Parenthesis in City names in germany leads to empty results (especially when in name:suffix) Postbox refs with full address leads to empty search results May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants