If you're interested in making both forward and reverse geocoding better, please consider paying attention to a project I started and help maintain called OpenAddresses:<p><a href="http://openaddresses.io" rel="nofollow">http://openaddresses.io</a><p>The goal is to collect address datasets so that forward and reverse geocoding is an easier problem to solve. A contributor wrote an excellent overview of the project the other day:<p><a href="https://medium.com/colemanm/creating-an-open-database-of-addresses-73a7d0dc24c5" rel="nofollow">https://medium.com/colemanm/creating-an-open-database-of-add...</a>
You can't really use KD trees with lat/lon coordinates, at least you can't use euclidean distance there for nearest neighbor search.<p>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 neighbors when using it for locations far from equator.
Kudos for a very well done README (and it's not just cribbed from the original project, it explains the new stuff very well and tells what the project is, and gives credit back). So many projects neglect the README.<p>One question - is it OK to put an MIT license on something that is based on LGPL code? I don't know enough about how the LGPL works (I do know it is less "infective" than plain GPL).<p>Well two questions: python2, or python3?
While 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.<p>(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 backwards, with the information found near the end, such as country name and postal code, used to disambiguate the information found earlier.)
Very good companion for Geocoder - <a href="https://github.com/DenisCarriere/geocoder" rel="nofollow">https://github.com/DenisCarriere/geocoder</a>. Glad to see Python getting more geo libraries for Non-GIS users.
Very impressive, I'll be looking closer at K-D trees.<p>I wrote a quick (500k lookups/sec) offline geocoder for Ruby: <a href="https://github.com/bronson/geolocal" rel="nofollow">https://github.com/bronson/geolocal</a> to comply with the silly EU cookie rules. It precompiles the statements you're interested in:<p><pre><code> Geolocal.in_eu?(request.ip)
Geolocal.in_us?('8.8.8.8')
</code></pre>
Glad to see that my lib has a role model if it ever grows up. :)
Looks really interesting!<p>Would it be possible to use OpenStreetMap data?<p><a href="http://planet.openstreetmap.org/" rel="nofollow">http://planet.openstreetmap.org/</a>
Nice! Shameless plug for a SQLite no network geocoder that uses (I believe) the same text files to seed everything.
<a href="https://github.com/NickStefan/no-network-geocoder" rel="nofollow">https://github.com/NickStefan/no-network-geocoder</a>
On a related note: An efficient geolocation encoder/decoder with error correction using Reed-Solomon. 3m accuracy with error correction in 10 symbols. 20mm accuracy with 5-nines certainty in 15 symbols:<p><a href="https://github.com/pjkundert/ezpwd-reed-solomon" rel="nofollow">https://github.com/pjkundert/ezpwd-reed-solomon</a>
This is great, does anyone know of a js version? I'm currently using <a href="http://nominatim.openstreetmap.org/reverse" rel="nofollow">http://nominatim.openstreetmap.org/reverse</a> in my Node app but I'd rather not rely on a 3rd party, especially under heavy load.
This is super cool! Shameless plug. If you're looking for street-level reverse (or forward) geocoding, we offer[1] a super affordable API and CSV upload tool.<p>[1] <a href="http://geocod.io" rel="nofollow">http://geocod.io</a>