osm-search / Nominatim

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

Postal Code for a given Geo Coordinate (Reverse Lookup) gives non deterministic results #3535

Closed precoder closed 1 month ago

precoder commented 1 month ago

Hello,

I am searching for an Address of a Race Track in Italy by making a reverse lookup. I get two different results for the same requests with the same input. You may need to try a few times to get the second result set.

What did you search for?

My Geo Coordinate is lat:45.04427 long:12.15115

My query is: https://nominatim.openstreetmap.org/reverse?lat=45.04427&lon=12.15115&format=geocodejson

What result did you get?

I get 2 different results with same input on different times: Result 1: Postal Code: 45011 Street: SP41

Result 2: Postal Code:45010 Street: "Strada Provinciale 41 Cavanella Po-Porto Viro"

Street is not that much dramatic but the postal code should not be different. The Race Track for Address search is: https://www.openstreetmap.org/way/74695979

Here is the complete result JSONs: reverse-1.json reverse-2.json

What result did you expect?

Deterministic Postal Code for the same query on consequent executions.

mtmail commented 1 month ago

Around that place there isn't enough postcode data to make a good guess which postcode would be best.

https://overpass-turbo.eu/s/1RcP image

45010 is both to the west and east, Nominatim calculates a center point. It covers a surprisingly large area image

45011 is around the same center point image

There are multiple servers behind the nominatim.openstreetmap.org URL. You probably see responses from different servers, while each is dtermininistic with its own data.

Do you have local knowledge and can add a postcode to the racetrack or surrounding buildings?

precoder commented 1 month ago

According to Wikipedia the Track seems to be closed since 2022 https://en.wikipedia.org/wiki/Adria_International_Raceway

It is inside of the Adria Region therefore the postal code with 45011 should be correct. https://www.openstreetmap.org/relation/44016#map=12/45.0573/12.0539

Since the Race Track is closed official Web Site is also down https://www.adriaraceway.com/

After a little more search I found that Wayback Machine has a capture of web site from 2021 http://web.archive.org/web/20210323055241/https://www.adriaraceway.com/ Which states the 45011 as postal code for the race track officially.

image

lonvia commented 1 month ago

Closing as data issue.

Postcodes will always be approximate unless directly mapped at the object.