Today's Geohack

Following hot on the heels of Yahoo's announcement of their Internet Location Platform, I wrote a quick 20-line Python hack to convert from latitude and longitude to a place name. Because the ILP doesn't yet expose the ability to go from a position to a WOEID we have to ask the Flickr web services to do this first (as Flickr is owned by Yahoo this is using the same backend). Once we have the WOEID, it can be then be looked up on the ILP and useful information obtained. Example speak more than words:

$ python geohack.py 
Using position 51.872330 0.161950
Got WOEID 12775
Got town Bishop's Stortford

Now to write a GeoClue provider which will fill in the locality information from the position. Long-term grand plans involve integrating all of this geo magic into Postr, somehow.

NP: Third, Portishead

10:50 Tuesday, 13 May 2008 [#] [computers] (4 comments)

Posted by Zaheer at Tue May 13 12:05:00 2008:
Is the 20-line python hack publicly available?
Posted by Jeff Waugh at Tue May 13 12:09:31 2008:
Niiiiiiice! So how do we convince desktop hackers to start playing with GeoClue? :-)
Posted by Luca Cavalli at Tue May 13 13:32:09 2008:
Does this stuff allow me to look for neighbour GNOME friends and chat with them with Empathy?
Posted by Jussi Kukkonen at Wed May 14 12:18:55 2008:
For reference, this is what the existing Geoclue reverse geocoder (using Geonames.org) gives for the same coordinates:
> Using provider 'Geonames'
> Reverse Geocoded  [51.87, 0.16] to address (accuracy 3):
>  country: United Kingdom
>  region: England
>  countrycode: GB
>  locality: Bishops Stortford

Name:


E-mail:


URL:


Add 6 and 6 (required):


Comment: