Friday, March 02, 2007

Geonames Ruby API

The Geonames graphical database contains over eight million geographical names and consists of 6.3 million unique features whereof 2.2 million populated places and 1.8 million alternate names. It was created by Marc Wick, a software engineer in Switzerland. He has released it under a Creative Commons license and was nice enough to provide a freely available Web Service to integrate it into your applications.

The Geonames web service has proven itself very useful to me for the development of Carpool Connect. I'm currently using it to reverse geocode longitude and latitude coordinates and plan on using other features of it in the future.

I've put together a ruby library for accessing the Geonames Web service and released it under the Apache Open Source license. You can find more information about it on the project page.

To insatall:
# gem install geonames
Example Usage:
require 'geonames'
places_nearby = Geonames::WebService.find_nearby_place_name 43.900120387, -78.882869834
p places_nearby

country_subdivision = Geonames::WebService.country_subdivision 43.900120387, -78.882869834
p country_subdivision

0 Comments:

Post a Comment

<< Home