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 support for OpenStreetMap and LocationIQ geocoders #353
Comments
I have been debugging this and the problem seems to be in how the coordinates are parsed/transformed: LocationIQReverse([52.52, 13.40]) gives a wrong result, looks like the query with the coordinates in the generated URL is malformed. LocationIQReverse("52.52, 13.40") gives the right result. |
I came across the same issue as you while trying to use reverse geocoding from LocationIQ, #359 is my attempt to fix it. I didn't look at the OpenStreetMap reverse geocoding yet but I will try to check it out now that I got the other one working. |
@g-mc , I thought initially that the "reverse.php" endpoint was LocationIQ specific, but I see now that it's a Nominatim endpoint. Checking their git history I see It's there at least since 2010. That leads me to think that your solution should be applied also/to OSM, but probably that deserves a deeper look. |
I wanted to keep that PR as small as possible and didn't have a chance to
look into the other one yet. I will try to take a look later today and work
on a separate PR to hopefully fix the second part of this issue.
… |
First of all thanks for this awesome library.
I was trying to do some reverse geocoding with LocationIQ:
geocoder.locationiq([latitude, longitude], method='reverse', key='...')
But I am getting the following error:
Status code 404 from https://locationiq.org/v1/search.php: ERROR - 404 Client Error: Not Found for url: https://locationiq.org/v1/search.php?key=...
I looked into their documentation and they specified the following URL for reverse geocoding:
https://locationiq.org/v1/reverse.phpkey=YOUR_API_KEY&lat=LATITUDE&lon=LONGITUDE&format=json
At the same time as far as I understand they use internally OSM so I would expect the geocoder for both providers to show reverse geocoding, but it's missing in geocoder OSM documentation.
I am willing to contribute on this topic, but I would like to first clarify if there is a real problem or if it's me just not understanding something.
The text was updated successfully, but these errors were encountered: