Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse geocoding less accurate compared to Nominatim #626

Closed
avshabavsha opened this issue Jan 3, 2022 · 2 comments
Closed

Reverse geocoding less accurate compared to Nominatim #626

avshabavsha opened this issue Jan 3, 2022 · 2 comments

Comments

@avshabavsha
Copy link

Hello,

I noticed in some of the reverse geocoding queries I do, the returned feature (e.g. street name) is not always accurate.

Searching the same lat/lon gave different result between Photon and Nominatim (the street in Nominatim was correct).

Taking into account Photon's data is migrated from Nominatim, I would expect that the accuracy would be consistent - both would either be wrong or be right.

I both checked photon result with the public https://photon.komoot.io, and ran locally using latest data (specifically in this case of Greece). In both I got the wrong address as the top result.

I am trying to understand the gap, and see if there's some change in query that can be done to make the photon result more accurate.
The only thought I had is that maybe during migration to photon, the street geometry is stored as a the a point which is the center of each street and not as a LineString?

Visual Explanation

To understand better what is returned from Photon, I made the call with limit of 20 to see the features found in the wanted area (pasted in geojson.io).
I've marked the coordinates location I looked at, which features returned and the feature which is considered the closest.
image

Comparison between Photon and Nominatim calls (notice the returned name):

Photon
https://photon.komoot.io/reverse?lon=23.90427952592436&lat=38.032463599743316&lang=default
{
"features": [{
"geometry": {
"coordinates": [23.903924, 38.0336909],
"type": "Point"
},
"type": "Feature",
"properties": {
"osm_id": 63853942,
"extent": [23.9021816, 38.034418, 23.9064719, 38.0329742],
"country": "Ελλάς",
"city": "Δημοτική Ενότητα Πικερμίου",
"countrycode": "GR",
"postcode": "153 51",
"county": "Περιφερειακή Ενότητα Ανατολικής Αττικής",
"type": "street",
"osm_type": "W",
"osm_key": "highway",
"district": "Ντράφι",
"osm_value": "residential",
"name": "Πυθαγορα",
"state": "Αποκεντρωμένη Διοίκηση Αττικής"
}
}
],
"type": "FeatureCollection"
}

Nominatim
https://nominatim.openstreetmap.org/reverse?lon=23.90427952592436&lat=38.032463599743316&accept-language=default&format=geojson
{
"type": "FeatureCollection",
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
"features": [{
"type": "Feature",
"properties": {
"place_id": 117494205,
"osm_type": "way",
"osm_id": 62092990,
"place_rank": 26,
"category": "highway",
"type": "tertiary",
"importance": 0.09999999999999998,
"addresstype": "road",
"name": "Αιολέων",
"display_name": "Αιολέων, Ντράφι, Κοινότητα Πικερμίου, Δημοτική Ενότητα Πικερμίου, Δήμος Ραφήνας - Πικερμίου, Περιφερειακή Ενότητα Ανατολικής Αττικής, Περιφέρεια Αττικής, Αποκεντρωμένη Διοίκηση Αττικής, 153 51, Ελλάς",
"address": {
"road": "Αιολέων",
"suburb": "Ντράφι",
"city_district": "Κοινότητα Πικερμίου",
"city": "Δημοτική Ενότητα Πικερμίου",
"municipality": "Δήμος Ραφήνας - Πικερμίου",
"county": "Περιφερειακή Ενότητα Ανατολικής Αττικής",
"state_district": "Περιφέρεια Αττικής",
"state": "Αποκεντρωμένη Διοίκηση Αττικής",
"postcode": "153 51",
"country": "Ελλάς",
"country_code": "gr"
}
},
"bbox": [23.8949478, 38.0324145, 23.9055246, 38.0344383],
"geometry": {
"type": "Point",
"coordinates": [23.904281013355874, 38.03248857205444]
}
}
]
}

Used versions:

photon version: 0.3.5
downloaded data (28-Dec-2021): https://download1.graphhopper.com/public/extracts/by-country-code/gr/photon-db-gr-latest.tar.bz2

Thank you,
Avshalom

@lonvia
Copy link
Collaborator

lonvia commented Jan 3, 2022

Photon does not store complete geometries for its features but just the bounding boxes. The accuracy of reverse geocoding is limited by that. See also #357 for more discussion on that.

@lonvia
Copy link
Collaborator

lonvia commented Mar 18, 2022

Closing as duplicate of #357.

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

No branches or pull requests

2 participants