This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to detect when a Nominatim request is not precise?

1

Hello everyone, I'm trying to do some reverse geocoding using Nominatim. So far it's great. However, there is a problem.

I'll give an example:

I've put some coordinates of a city that is yet to be mapped. Here are some coordinates:

lat: -24.18019,lon: -46.78167 - Returns a road called "Av. Condessa de Vimieiros", even though those coordinates belong to "Av. Rui Barbosa".

lat: -24.18083, lon: -46.78525 - Returns a road called "Av. Condessa de Vimieiros", even though those coordiantes belong to "R. João Mariano Ferreira".

Now, I think that this one road is being returned because it's the nearest thing mapped to the coordinates I provided. But is there some parameter Nominatim returns to identify wheter or not the location is precise? Or is there even a way to do this?

Thanks.

asked 14 Feb '13, 18:30

gabriel_casado's gravatar image

gabriel_casado
41559
accept rate: 0%

edited 15 Feb '13, 09:11

Vincent%20de%20Phily's gravatar image

Vincent de P... ♦
17.3k18152249

3

Just to be clear about the problem: there is a street at the selected coordinates, but it doesn't have a name (and therefore no nominatim place_id ?), so nominatime returns the closest named object without a mention of the nameless one.

(15 Feb '13, 09:19) Vincent de P... ♦
2

@Vincent de Phily

Exactly this. There is a street in the said coordinate, but it doesn't have a name so it returns the closest one.

Is there a way to impeach Nominatim from returning me the closest place, and instead returning me an error message or something?

(15 Feb '13, 12:29) gabriel_casado

One Answer:

2

The nominatim api does not have this feature.

answered 15 Feb '13, 14:45

cartinus's gravatar image

cartinus
7.0k1066105
accept rate: 27%

There is no workaround to this?

(15 Feb '13, 15:34) gabriel_casado

There are always workarounds:

  • You could use a different (reverse) geocoder.
  • You could write some new code for Nominatim, so it will support this in the future.
  • etc.

Yes, I understand this is not the answer you wanted to get, but sometimes life is just that way.

(15 Feb '13, 16:57) cartinus

I get it. Thanks.

(15 Feb '13, 17:01) gabriel_casado

Source code available on GitHub .