Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

geocoders. A fifteen minute project extracted from something else I’m working on—an ultra simple Python API for geocoding a single string against Google, Yahoo! Placemaker, GeoNames and (thanks to Jacob) Yahoo! Geo’s web services.

Tagged , , , , , , , , , ,

6 comments

  1. I also wrote a Python wrapper for Placemaker: python-placemaker. It can take a string or a URL and pass it to the Placemaker API.

    Aaron - 27th May 2009 14:50 - #

  2. Small suggestion for improvement: how about using decimal.Decimal objects instead of floats?

    Adrian Holovaty - 27th May 2009 18:10 - #

  3. Why not geopy? http://code.google.com/p/geopy/

    Michael - 27th May 2009 18:51 - #

  4. Michael: no reason, geopy looks great.

    Adrian: I'm not sure decimal objects would offer a definite advantage here. Once you get past four or five decimal places in a lat/long you're down to metres anyway, and none of the geocoders it's using are nearly that accurate.

    Simon Willison - 27th May 2009 19:01 - #

  5. Are you swapping lat & lon on your Google results or is your example just wrong? If I remember correctly Google is weird and returns location data as lon/lat instead of lat/lon like everyone else in the world is used to.

    Mike Malone - 27th May 2009 20:09 - #

  6. Oops, thanks Mike - fixed.

    Simon Willison - 27th May 2009 23:09 - #

Comments are closed.
A django site