osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.59k stars 1.01k forks source link

Reverse geocoding: quarter is less prioritized than village (Bonn) #19943

Open Peter0 opened 3 months ago

Peter0 commented 3 months ago

Description

When reproducing this issue as mentioned below, an odd kind of neighbourhood attribution arises.

Steps to reproduce

Go to e.g. 50.74290 7.18074. Tap on the building (way #261824846). In the map, the building will be outlined. At the bottom screen edge, immediately the Housenumber appears ("1" in this case), followed by "position, address will be searched" (note: manually translated to english from german GUI).

Actual result

After a short moment, "Am Friedhof (Niederholtorf) 1, Bonn" appears as search result.

Minor issue, mentioned by the way: According to german addressing habits, one would say "Am Friedhof 1, Bonn (Niederholtorf)". Another minor issue, mentioned by the way, too: The complete address (suitable for (non-international) mail services) would be "Am Friedhof 1, 53229 Bonn" (mention of postal code added). Nevertheless, displaying the village ("Niederholtorf" in this case) is (albeit not necessary for postal services) a benefit to get one’s bearings.

But, to cut a long story short, the result "Niederholtorf" ist wrong (major issue). Refer to https://www.openstreetmap.org/relation/330878 that shows the outline of Holtorf (which Niederholtorf is part of). Note also the neighbouring village Holzlar https://www.openstreetmap.org/relation/365425 that the mentioned position is clearly part of. "Holzlar" is also in my opinion a true answer to mention: "Am Friedhof 1, 53229 Bonn (Holzlar)" would be perfect.

Apparently, the address search looks for neighbourhood-nodes nearby. But note that currently, the neighbourhood-node for Niederholtorf (#247267401) seems to be attributed to building #261824846 (mentioned at the beginning). But node #247267401 and way #261824846 doesn’t belong to the same administrative boundary. (Building belongs to area according to relation #365425, node belongs to area according to relation #330878).

Expected result

"Am Friedhof (Holzlar) 1, Bonn" or "Am Friedhof (Heidebergen) 1, Bonn" Whether (in a future release) the result would be "Holzlar" or "Heidebergen" is from my local gut feeling a matter of taste. But the currently displayed "Niederholtorf" is clearly odd and should be avoided. A somewhat better result would be "Am Friedhof 1, Bonn (Holzlar)" or even "Am Friedhof 1, 53229 Bonn (Holzlar)"; refer to minor issues mentioned above.

Your Environment (required)

OsmAnd Version: ~4.7.10
Android/iOS version: /e/OS similar to android 9
Device model: Samsung Galaxy J5
Crash-Logs: No crash
Peter0 commented 3 months ago

Offline standard maps are used, particulary Germany,NRW,Regierungsbezirk Köln.

yuriiurshuliak commented 3 months ago

The bug has been reproduced. After following the coordinates (50.74290 7.18074) and clicking on the building, the address displayed is "Am Friedhof (Niederholtorf) 1, Bonn," instead of the correct one.

OsmAnd~ 4.8.0#2395m, released: 2024-05-27

yuriiurshuliak commented 1 month ago

It should be noted that the user considers the result "Am Friedhof (Niederholtorf) 1, Bonn" incorrect.

Here is the link to Nominatim: Nominatim Here is the link to OSM: OSM

There are the following tags for this issue:

Heidebergen - place: neighborhood Holzlar - boundary: administrative Niederholtorf - place: village

Referring to this, the question arises: why is it better to give priority to an administrative district or a village?

vshcherb commented 1 month ago
  1. https://www.openstreetmap.org/relation/62508 it's still part of Bonn relation.
  2. Nominatim also recognizes as part of Niederholtorf
  3. Holzlar - is a quarter (https://www.openstreetmap.org/node/371596295#map=14/50.7450/7.1791)

We don't index quarter but try to address to suburb or to village.

Peter0 commented 1 month ago

Referring to this, the question arises: why is it better to give priority to an administrative district or a village?

I think this should be dynamically decided. If, as is the case here, a source (here: place:village) delivers only a point (instead of an area), it should be considered less trustworthy. Holzlar, on the other hand, is (via relation https://www.openstreetmap.org/relation/365425 ) equipped with a trustworthy boundary, where one can make a yes-no-decision whether a punctiform object is in- or outside.

At least, I'd recommend that a punctiform source (like place:village Niederholtorf) has a strongly declining distance-law. If something is 10 or 20 m distant from a "village pump" it is another thing than an 1000 m distant object. JM2C

vshcherb commented 1 month ago

For quarters that have boundaries it could be indexed