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

Incorrect revers geocode response for long road segments #864

Closed
mrosendorff opened this issue Jan 29, 2025 · 1 comment
Closed

Incorrect revers geocode response for long road segments #864

mrosendorff opened this issue Jan 29, 2025 · 1 comment

Comments

@mrosendorff
Copy link

mrosendorff commented Jan 29, 2025

When a query is made for reverse geocoding on a long road segment it resolves to an incorrect road, not sure if its only looking at the endpoints of the road segment or something like that.

Current behavior

For the following request

https://photon.komoot.io/reverse?lat=-26.65970059172413&lon=27.730073991636242&radius=3

If you look at this latitude and longitude from the above it is exactly on the highway called the N1

Image

However the result returned from the query is

{
    "features": [
        {
            "geometry": {
                "coordinates": [
                    27.7368052,
                    -26.6829766
                ],
                "type": "Point"
            },
            "type": "Feature",
            "properties": {
                "osm_id": 215455188,
                "extent": [
                    27.732934,
                    -26.6828855,
                    27.7387441,
                    -26.6870423
                ],
                "country": "South Africa",
                "city": "Emfuleni Local Municipality",
                "countrycode": "ZA",
                "county": "Sedibeng District Municipality",
                "type": "street",
                "osm_type": "W",
                "osm_key": "highway",
                "district": "Emfuleni Ward 25",
                "osm_value": "residential",
                "name": "Hugo Road",
                "state": "Gauteng"
            }
        }
    ],
    "type": "FeatureCollection"
}

Which is Hugo road, over 2 km away from the query point

Image

Please let me know if I can give any further details

@lonvia
Copy link
Collaborator

lonvia commented Feb 4, 2025

Duplicate of #357.

Photon currently only stores bbox and centroid of the features. Reverse search is always based on the centroid, thus the inaccuracy. #823 lays the groundwork for having full geometries.

@lonvia lonvia closed this as completed Feb 4, 2025
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