osm-search / Nominatim

Open Source search based on OpenStreetMap data
https://nominatim.org
GNU General Public License v3.0
2.98k stars 701 forks source link

Interpolated address doesn't return city, state #3421

Closed mtmail closed 1 month ago

mtmail commented 1 month ago

What did you search for?

Somewhat remote location in Canada

https://nominatim.openstreetmap.org/ui/reverse.html?lat=48.66510&lon=-71.22887&zoom=18

What result did you get?

https://nominatim.openstreetmap.org/ui/details.html?osmtype=W&osmid=143579633&class=place

  "category": "place",
  "type": "house",
  "addresstype": "place",
  "display_name": "3, Canada",
  "address": {
    "house_number": "3",
    "country": "Canada",
    "country_code": "ca"
  },

What result did you expect?

A street name, city, region, state. A nearby search on the same street returns house number 1 https://nominatim.openstreetmap.org/ui/reverse.html?lat=48.66611&lon=-71.22907&zoom=18

and contains

  "display_name": "1, Chemin du Lac-à-l'Ours, Saint-David-de-Falardeau, Le Fjord-du-Saguenay, Saguenay–Lac-Saint-Jean, Quebec, Canada",
  "address": {
    "house_number": "1",
    "road": "Chemin du Lac-à-l'Ours",
    "village": "Saint-David-de-Falardeau",
    "county": "Le Fjord-du-Saguenay",
    "region": "Saguenay–Lac-Saint-Jean",
    "state": "Quebec",
    "ISO3166-2-lvl4": "CA-QC",
    "country": "Canada",
    "country_code": "ca"
  },
lonvia commented 1 month ago

Might be a good idea to simple drop all interpolation lines, where the algorithm cannot find a parent street. The number of bogus interpolation lines in Canada is a serious issue.

mtmail commented 1 month ago

The interpolation east of the street https://www.openstreetmap.org/way/143579633 (odd, 1..7) isn't marked by the Nominatim QA tool. The interpolation west of the street https://www.openstreetmap.org/way/143579620 is (even, 2..2) probably because a range of 2..2 doesn't make sense.

The interpolation adds some value in the area, at least it (the node) mentions a street name that is otherwise not in OSM data. (A taxi driver wouldn't need it, "road to $name-of-lake" is of course near the lake).

lonvia commented 1 month ago

The QA tool doesn't flag interpolations without a parent. Maybe it should. There are currently about 500 in the database. So the problem is small.

True, there is a street name. Might be worth copying those to a nearby street/path to "fix" the issue?