Monday, November 13, 2006

Geograph.org.uk API

The Geograph British Isles Project is an open source, user-driven effort to photograph every single square kilometer in the UK and Eire and is sponsored by the Ordnance Survey. It now boasts nearly 3000 users that have submitted roughly 250000 pictures of the UK and its beautiful scenery.

Among the things it offers, is a very extensive API with a large number of output formats including but not limited to CSV, RSS, KML, and GPX. One can specify a large and diverse set of input parameters and export the results in the format that best suits him. Over at Nestoria, you might have noticed a small tab labeled 'pics' when you are looking for property at a specific place. For example, why not check out the lovely scenery around Tayport or the dome architecture in Holborn. Although we currently host pictures from Flickr, we recently decided to expand our collection and include higher quality pictures from the Geograph project as well!
So go ahead, check out the new pictures and as always, let us know what you think.

While on that, I build a CPAN module interface for their API: WebService::Geograph::API.
It currently supports two output methods, csv for CSV exporting and search for creating custom searches. It has three major components:

  • WebService::Geograph::API , essentially a subclass of LWP::UserAgent. It holds the new constructor method which sets the API key.
  • WebService::Geograph::Request, a request object to the API. Essentially a subclass of HTTP::Request.
  • WebService::Geograph::Response, a response object with some additional fields. A subclass of HTTP::Response.
More information and an extensive usage guide (sort of) can be found on the modules CPAN page. Please note that in order to make use of their API you will need to obtain an API key. Getting an API key is fast & easy so why not contact the very helpful people over at Geograph for one.

Also, last but by no means least, a big thank you to Barry Hunter from Geograph for all his support and the rest of the team over at Nestoria. More information on the launch, located at Nestoria Blog.

Edit: Following some obscure indexing problem with CPAN, the module is finally live.