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 _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Adam Denenberg 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 > adamAdam - 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 http://www.favoriterun.com -- Posted via http://www.ruby-forum.com/.
Adam: On Dec 14, 2005, at 7:38 AM, Dave wrote:> Adam Denenberg 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 Diwan <hasan.diwan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
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 On 12/14/05, Hasan Diwan <hasan.diwan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Adam: > On Dec 14, 2005, at 7:38 AM, Dave wrote: > > > Adam Denenberg 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 Diwan <hasan.diwan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails