Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Reverse geocode wrong state on zoom 18 #4990

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 8 comments
Closed

Reverse geocode wrong state on zoom 18 #4990

openstreetmap-trac opened this issue Jul 23, 2021 · 8 comments

Comments

@openstreetmap-trac
Copy link

Reporter: emilio.mejia[at]gmail.com
[Submitted to the original trac issue database at 5.53am, Saturday, 21st September 2013]

I installed on my server nominatim.
But entering a query in reverse geocode with different zoom get a different state. In the zoom 18 state is wrong, in zoom 12 state is correct.

-141, Florencia, Heredia, 4400123, Costa Rica-141FlorenciaHeredia4400123Costa Rica<country_code>cr</country_code>

-Florencia, Alajuela, Costa Rica-FlorenciaAlajuelaCosta Rica<country_code>cr</country_code>

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 3.46pm, Saturday, 21st September 2013]

This might happen because reverse actually returns the address of the nearest object and not the address of the geographic point you asked for. As the address of each object is computed independently, this might lead to different results when places are mapped as nodes only and Nominatim has to guess about which object belongs where.

In your example the nearest object at zoom 18 is a street which was computed as being in Heredia because that is the closest state place node, while at zoom 12 the closest object is the city of Florencia which got put in state Alajuela because of the is in. As it happens, this particular case can be easily fixed by adding [http://wiki.openstreetmap.org/wiki/Relation:boundary admin boundary relations] for the states. It looks like the boundary ways are already there, e.g. [http://www.openstreetmap.org/browse/way/31715586 this way].

@openstreetmap-trac
Copy link
Author

Author: emilio.mejia[at]gmail.com
[Added to the original trac issue at 4.44pm, Saturday, 21st September 2013]

Tks.

We speak the same geographical point ?
lat=10.34368&lon=-84.4336666666667

OSM, checked:

Florencia: Town
Boundary: correct, level 4
is_in = Alajuela

Other points of other provinces seem equally skip administrative borders, which I can do so that these are not omitted from the querys?

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 5.04pm, Saturday, 21st September 2013]

Yes, same point. The state for the town is correct, the street you get with zoom=18 is the one which is put in a different province because the place node is closer and the street does not have a is_in tag.

You need to add boundary relations for all provinces in Costa Rica. Currently there are only boundary ways. That is not sufficient for computing correct addresses.

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 6.41pm, Saturday, 21st September 2013]

Please don't start to add is_in tags to roads. That is the wrong way to solve this problem. Fix the boundaries.

@openstreetmap-trac
Copy link
Author

Author: emilio.mejia[at]gmail.com
[Added to the original trac issue at 7.00pm, Saturday, 21st September 2013]

No tags is_in on roads. I understand that I should not because it would cause errors in other points.
However I have carefully reviewed the boundary is are fine.

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 8.14pm, Saturday, 21st September 2013]

No, the boundaries are not fine because there are no boundaries. You absolutely must create relations'', like [http://www.openstreetmap.org/browse/relation/2194896 this one]. If there are no boundary ''relations, there is no way for Nominatim to find the boundaries of your provinces. Ask other local mappers for help if you don't know about relations or don't know how to create them.

@openstreetmap-trac
Copy link
Author

Author: emilio.mejia[at]gmail.com
[Added to the original trac issue at 9.55pm, Saturday, 21st September 2013]

Understand, tks.

@openstreetmap-trac
Copy link
Author

Author: emilio.mejia[at]gmail.com
[Added to the original trac issue at 12.05am, Thursday, 26th September 2013]

Boundaries finish 22/09.

Tested:

http://nominatim.openstreetmap.org/reverse?format=xml&lat=10.3116016666667&lon=-84.1814116666667&zoom=18&addressdetails=1

Result: (OK)
Alajuela

http://192.168.1.117/nominatim/reverse?format=xml&lat=10.3116016666667&lon=-84.1814116666667&zoom=18&addressdetails=1

Result: (Wrong)
Heredia

The local server is update to : Data: 2013/09/25 19:13 GMT

I need to make some additional changes to my server or in osm?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant