This is great, does anyone know of a js version? I'm currently using http://nominatim.openstreetmap.org/reverse in my Node app but I'd rather not rely on a 3rd party, especially under heavy load.
Check out this library for Node https://github.com/tomayac/local-reverse-geocoder
A fast, offline reverse geocoder in Python
41–46 of 46 posts
Re: A fast, offline reverse geocoder in Python
#42You can't really use KD trees with lat/lon coordinates, at least you can't use euclidean distance there for nearest neighbor search. First, longitude wraps from -180 to +180 at antimeridian, meaning distance calculations will fail there; second, and I'd say more importantly, one degree longitude length in meters differs a lot depending on latitude; meaning this library will be heavily biased towards longitudal neighb…
I can recommend the excellent Geographic lib::Geodesic for this having used it in the past. http://geographiclib.sourceforge.net There is a python implementation available as well. http://pypi.python.org/pypi/geographiclib
Re: A fast, offline reverse geocoder in Python
#43Earlier quoted context omitted.
Thanks for that comment! Good question regarding the license. I'm not too sure about that. I'd appreciate it if someone could shed some light on it. Regarding the version, I've only tested it on python2. I should add that in the README. Thanks!
As of now, for Python 3 it does not work, but it seams that fixes are not hard: https://github.com/thampiman/reverse-geocoder/issues/2
Re: A fast, offline reverse geocoder in Python
#44You can't really use KD trees with lat/lon coordinates, at least you can't use euclidean distance there for nearest neighbor search. First, longitude wraps from -180 to +180 at antimeridian, meaning distance calculations will fail there; second, and I'd say more importantly, one degree longitude length in meters differs a lot depending on latitude; meaning this library will be heavily biased towards longitudal neighb…
Re: A fast, offline reverse geocoder in Python
#45Earlier quoted context omitted.
As of now, for Python 3 it does not work, but it seams that fixes are not hard: https://github.com/thampiman/reverse-geocoder/issues/2
UPDATE: I've just released v1.2 which supports Python 3. For details: https://github.com/thampiman/reverse-geocoder
Re: A fast, offline reverse geocoder in Python
#46While we're on this subject, is there a good, free street address parser that will work for at least the US, Canada, UK, and the major EU countries? I've tried most of the available ones, and they can parse about 90-95% of business addresses. (Regular expressions don't work well for this. Neither does starting from the beginning of the address. Proper address parsing starts at the end of the address and works backwar…