# Geocoding Goodness

**URL:** <https://www.ruby-forum.com/t/geocoding-goodness/63298>\
**Category:** Ruby\
**Created:** [June 13, 2006, 11:58pm UTC](https://www.ruby-forum.com/t/geocoding-goodness/63298 "2006-06-13T23:58:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![miracleofmagick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Post date:** [June 13, 2006, 11:58pm UTC](https://www.ruby-forum.com/t/geocoding-goodness/63298/1 "2006-06-13T23:58:25Z")

</div>

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

Yahoo! – yahoo-geocode  
Google – google-geocode  
[geocoder.us](http://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](http://geocoder.us).

Yahoo!:

[http://dev.robotcoop.com/Libraries/yahoo-geocode/index.html](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)

> **[dev.robotcoop.com](https://www.robotcoop.com/dev-sub/index.html)**
>
> Tools and projects used by The Robot Co-op, Inc.

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](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://geocoder.us):

[http://dev.robotcoop.com/Libraries/geocoder-us/index.html](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 H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![miracleofmagick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Post date:** [June 14, 2006, 12:18am UTC](https://www.ruby-forum.com/t/geocoding-goodness/63298/2 "2006-06-14T00:18:00Z")

</div>

On Wed, 14 Jun 2006, Eric H. wrote:

> I’ve implemented ruby bindings for the three major geocoding APIs as gems:
> 
> Yahoo! – yahoo-geocode  
> Google – google-geocode  
> [geocoder.us](http://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

---

<div class="post-metadata">

**Author:** ![miracleofmagick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Post date:** [June 14, 2006, 12:28am UTC](https://www.ruby-forum.com/t/geocoding-goodness/63298/3 "2006-06-14T00:28:31Z")

</div>

On Jun 13, 2006, at 2:55 PM, Eric H. wrote:

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

> Eric H. - removed\_email\_address@domain.invalid - [http://blog.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

---

<div class="post-metadata">

**Author:** ![miracleofmagick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Post date:** [June 14, 2006, 10:34pm UTC](https://www.ruby-forum.com/t/geocoding-goodness/63298/4 "2006-06-14T22:34:26Z")

</div>

On 6/14/06, Ezra Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Jun 13, 2006, at 2:55 PM, Eric H. wrote:
> 
> > I’ve implemented ruby bindings for the three major geocoding APIs  
> > as gems:

THANK YOU!
