Forum: Ruby Geocoding Goodness

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eric Hodel (Guest)
on 2006-06-13 23:58
(Received via mailing list)
I've implemented ruby bindings for the three major geocoding APIs as
gems:

Yahoo!      -- yahoo-geocode
Google      -- google-geocode
geocoder.us -- geocoder-us

And as a bonus, you get a Yahoo! search gem to search either the web
or for locations, yahoo-search.

The bindings all have similar APIs, but return different objects
depending upon what information the API reliably provides.  Yahoo!
gives the most information, followed by Google, followed by geocoder.us.

Yahoo!:

http://dev.robotcoop.com/Libraries/yahoo-geocode/index.html

   require 'rubygems'
   require 'yahoo/geocode'

   yg = Yahoo::Geocode.new application_id
   locations = yg.locate '701 First Street, Sunnyvale, CA'
   p location.first.coordinates

(and searching for locations)

http://dev.robotcoop.com/Libraries/yahoo-search/index.html

   require 'rubygems'
   require 'yahoo/local_search'

   yls = Yahoo::LocalSearch.new application_id
   results, = yls.locate 'pizza', 94306, 2
   results.each do |location|
     puts "#{location.title} at #{location.address}, #{location.city}"
   end

Google:

http://dev.robotcoop.com/Libraries/google-geocode/index.html

   require 'rubygems'
   require 'google_geocode'

   gg = GoogleGeocode.new application_id
   location = gg.locate '1600 Amphitheater Pkwy, Mountain View, CA'
   p location.coordinates

geocoder.us:

http://dev.robotcoop.com/Libraries/geocoder-us/index.html

   require 'rubygems'
   require 'geocoder_us'

   gu = GeocoderUs.new 'username', 'password'
   p gu.locate('1924 E Denny Way, Seattle, WA')

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com
unknown (Guest)
on 2006-06-14 00:18
(Received via mailing list)
On Wed, 14 Jun 2006, Eric Hodel wrote:

> I've implemented ruby bindings for the three major geocoding APIs as gems:
>
> Yahoo!      -- yahoo-geocode
> Google      -- google-geocode
> geocoder.us -- geocoder-us

very cool eric.  we'll probably use these this summer so people can view
their
city as it looks at night from space.

cheers.

-a
Ezra Zygmuntowicz (Guest)
on 2006-06-14 00:28
(Received via mailing list)
On Jun 13, 2006, at 2:55 PM, Eric Hodel wrote:

> I've implemented ruby bindings for the three major geocoding APIs
> as gems:

<snip>

> Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
> This implementation is HODEL-HASH-9600 compliant


	Very very cool Eric. I have uses for this that I have been putting
off for a while now ;)

-Ezra
Leslie Viljoen (Guest)
on 2006-06-14 22:34
(Received via mailing list)
On 6/14/06, Ezra Zygmuntowicz <ezmobius@gmail.com> wrote:
>
> On Jun 13, 2006, at 2:55 PM, Eric Hodel wrote:
>
> > I've implemented ruby bindings for the three major geocoding APIs
> > as gems:

THANK YOU!
This topic is locked and can not be replied to.