opensoul.org

Announcing Graticule geocoding API

October 31, 2006 code 2 min read

update: Graticule is now hosted on Rubyforge.

Graticule is a geocoding API for interpolating address data into geographic coordinates written in Ruby. The goal is to provide a consistent interface into the various geocoding services, allowing other libraries to be built on top of them while remaining agnostic of the specific service that is being used.

In its current state, Graticule is just a repackaging of the different gems produced by Eric Hodel of Robot Co-op. It currently supports the Yahoo, Google, Geocoder.us, and MetaCarta APIs. The plan is to expand upon them.

Usage

You can grab the gem or check out the code from Subversion. The Rdoc is also available.

require 'rubygems'
require 'graticule'
geocoder = Graticule.service(:google).new "api_key"
location = geocoder.locate "1600 Amphitheatre Parkway, Mountain View, CA"

Feedback

I’d love to get your feedback. There are a few places where the API is still not consistent (e.g. Yahoo returns multiple results). I’d also appreciate any help with packaging and releasing as I am a newbie at creating Gems.

This content is open source. Suggest Improvements.

@bkeepers

avatar of Brandon Keepers I am Brandon Keepers, and I work at GitHub on making Open Source more approachable, effective, and ubiquitous. I tend to think like an engineer, work like an artist, dream like an astronaut, love like a human, and sleep like a baby.