Geocode for Ruby

Hey,

Does anybody know of a good Geocode library for Ruby, similar to Perl’s
Geocode::Postal, that i could use in my rail app? I need to do some
“within
5 miles” calculations of zipcodes and i dont have a nice ruby (or gem)
utility to do it.

any help would be appreciated.

thanks
adam

Adam D. wrote:

Hey,

Does anybody know of a good Geocode library for Ruby, similar to Perl’s
Geocode::Postal, that i could use in my rail app? I need to do some
“within
5 miles” calculations of zipcodes and i dont have a nice ruby (or gem)
utility to do it.

any help would be appreciated.

thanks
adam

Adam - I don’t have any “libraries” per-se, but my sites currently are
built on rails and use geocoding to do some proximity querying. I have
some documentation at http://www.geocodeamerica.com/home/proximity that
might be helpful (its talks about integrating proximity queries in with
google maps, but does have some ruby code at the end). Feel free to
email me with any questions.

Dave

Adam:
On Dec 14, 2005, at 7:38 AM, Dave wrote:

Adam D. wrote:

Does anybody know of a good Geocode library for Ruby, similar to
Perl’s
Geocode::Postal, that i could use in my rail app? I need to do some
“within
5 miles” calculations of zipcodes and i dont have a nice ruby (or
gem)
utility to do it.

It doesn’t read like you’re doing strict geocoding here. To solve the
“within 5 miles” of zipcode problem, you need are the coordinates
extremities of said zipcode. Since latitude and longitude correspond
to distance, you then need to obtain how many degrees correspond to
your desired distance. You then merely need to check if the given
address’s coordinates fall into this range.
Cheers,
Hasan D. [email protected]

in my database i have zipcode, longitude, latitude, city name, state. I
understand pretty much whats involved in calculating distance, but there
are
a lot of factors involved in that formula so i was hoping that a library
already existed to do such things. i have read thru Geocode::Postal in
the
perl module and its pretty involved.

adam