Get geo-position coordinates from a UK postcode with Ruby
Introducing Pat, au ultra-lightweight Ruby gem for postcode->geolocation in the UK.
It's easy to install:
sudo gem install pat
And easy to use. (Try it from the command-line with irb -r rubygems -r pat)
postcode = Pat.get("SW1A 2TT")
postcode["geo"]["lat"]
=> "51.502308"
postcode["geo"]["lng"]
=> "-0.124345"
Source code for Pat here.
I hope someone finds it useful.