= metacarta-geoparser

Rubyforge Project:

http://rubyforge.org/projects/rctools

Documentation:

http://dev.robotcoop.com/Libraries/metacarta-geoparser

== About

metacarta-geoparser implements MetaCarta's GeoParser API:

http://labs.metacarta.com/GeoParser/documentation.html

== Installing metacarta-geoparser

Just install the gem:

$ sudo gem install metacarta-geoparser

== Using metacarta-geoparser

You can use either +locate+ or +locations+ to locate places:

+locate+ returns just one location, but includes a confidence estimate:

gp = MetaCartaGeoParser.new
location = gp.locate 'baghdad'
p location.coordinates
p location.confidence

+locations+ returns a list of locations and a viewbox surrounding all of them.

gp = MetaCartaGeoParser.new
locations, viewbox = gp.locations 'seattle'
p locations.length
p location.first.coordinates
p viewbox