Live data from Hacker News

A fast, offline reverse geocoder in Python

github.com

11–20 of 46 posts

Re: A fast, offline reverse geocoder in Python

#11

Looks really interesting! Would it be possible to use OpenStreetMap data? http://planet.openstreetmap.org/

OSM data doesn't contain an easy way to find the top 1000 cities. You'd end up with 100.000s. Looking for wikipedia tags, population (which often comes from Wikipedia) and 'admin' tags might be a good guide.

(I work on a OSM geocoder, not offline but has a Python library http://geocoder.opencagedata.com/)

Re: A fast, offline reverse geocoder in Python

#12
post #7

Very good companion for Geocoder - https://github.com/DenisCarriere/geocoder . Glad to see Python getting more geo libraries for Non-GIS users.

Are there any offline Geocoders that work for the whole world, even if not free? Nominatim doesn't work for a lot of Asian addresses.

Re: A fast, offline reverse geocoder in Python

#13

Starred. We're currently using nominatim + osm data + postgis on our own hosted servers. Can this be a good alternative?

We are currently using Postgis + geonames (the same DB used by this project) and it works very well. I'm curious to see benchmarks comparing the two.

edit: We are only interested in knowing the nearest big city though

Re: A fast, offline reverse geocoder in Python

#15

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

Re: A fast, offline reverse geocoder in Python

#16
Very impressive, I'll be looking closer at K-D trees.

I wrote a quick (500k lookups/sec) offline geocoder for Ruby: https://github.com/bronson/geolocal to comply with the silly EU cookie rules. It precompiles the statements you're interested in:

    Geolocal.in_eu?(request.ip)
    Geolocal.in_us?('8.8.8.8')
Glad to see that my lib has a role model if it ever grows up. :)

Re: A fast, offline reverse geocoder in Python

#18
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:

http://openaddresses.io

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:

https://medium.com/colemanm/creating-an-open-database-of-add...

Re: A fast, offline reverse geocoder in Python

#19

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: http://openaddresses.io 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: https://medium.com/colemanm/creating-an-open-…

Very cool project. Out of curiosity, how do you test the validity of the addresses?
Post reply on HN