URL: /plog/google-reverse-geocoding-vs.-geonames/results.log.txt

I've been experimenting with the new Google Reverse Geocoding which allows you to get the location name and country and stuff from a latitude/longitude coordinate.

What I've been doing is comparing this with GeoNames. GeoNames is available from geopy in the reverse-geocode branch.

I wrote down a list of about 15 lat/long points and the result I expect from them (taken from an existing app I'm contemplating switching to Google Reverse Geocoding for) and ran a batch of timed tests on. These results might satisfy the impatient:


FAILURES:
geonames_json        0
google               0
geonames             12

TOTAL TIMES:
geonames_json        2.43582677841        0.143283928142 seconds/request
google               2.24999976158        0.132352927152 seconds/request
geonames             1.78063511848        0.104743242264 seconds/request

First of all, a "failure" is when the place name simply can't be looked up. You could consider certain results a failure but it depends on what you intend to do with results. For example, GeoNames returned Glen Mills, United States whereas Google returned 38 Hitchcock Ln, Glen Mills, PA 19342, USA. With the Google results it's not always obvious that the "place name" (alternatively the town) is the second to last bit split by commas.

Using geopy to connect to GeoNames is clearly a bad idea. It's much better to just connect directly to the JSON REST URL.

In conclusion, I'm not going to change from using the GeoNames JSON API to Google Reverse Geocoding in my app.

You can see the complete results of my analysis here

If you're interested to see the code it's on github

Comments

David Janes

Sorry, I'm looking at this and obviously missing something. What's the back-end difference between geonames_json and geonames?

Also FYU: Yahoo has been doing stuff in this space also (e.g. http://pipes.yahoo.com/pipes/pipe.info?_id=AvAwHoPz3BGPOZZixJtC8g). It would be interesting to see how this stacks up.

Peter Bengtsson

To be honest I'm not too sure either. Logically it should be the same result since it's the same database at GeoNames. geopy is a great little library but clearly something has gone wrong in how it connects to GeoNames. Either that or they GeoNames returns results is different depending on how to approach them.

That Yahoo pipe uses GeoNames too. Just different wrapping.

kikislater

Hi,
Thanks for geopy ! It's really nice
How can I batch reverse geoding (google) ?

Thanks in advance

Your email will never ever be published.

Related posts