HOME JAVA & JEE OPEN SOURCE .NET WEB & RIA CLOUD & GRID ARCHITECTURE & DDD AGILE PM & SCRUM AGILE TESTING & BDD OS, MOBILE & SERVER  
London Ruby User Group:Using Geokit in Social Apps
Using Geokit in Social Apps
Geokit is a RubyGem and Rails plugin with a wrapper interface to various geocoding providers and supports geocoding addresses, latitude/longitude coordinates and IP addresses. Amongst several other things, Geokit also calculates distances between two points and the mid-point between them.
It consists of the mappable, inflector and geocoders modules. The steps for geocoding an address consists of installing the gem, opening an irb session, requiring the gem and geokit and entering an address to geocode.

The latitude and longitude data is returned along with the city. This data is put into Google's geocoder and reverse geocoding is done for the lat/lng point. One can also geocode an IP address. The Rails plugin can automatically geocode new ActiveRecord records upon creation, or an IP address in the controller and store the result in the session.
The gem allows distance calculation between two points in miles, kilometers and even nautical miles, as well as enabling heading calculation between two points in degrees. The Rails plugin does have certain limitations, such as its incompatibility with SQLite and below V 8.1 of PostgreSQL. However, it is supported on Ruby 1.9. Alternatives to Geokit include Graticule, YM4R and the defunct Geocoder.

ABOUT PAUL JENSEN
Developer at New Bamboo, hobbying comedy writer and designer
More about Paul Jensen
PODCAST USING GEOKIT IN SOCIAL APPS
Digg! StumbleUpon
SPONSORS
Manning Publications Co.
Skills Matter Ltd
RIA, AJAX & WEB PODCASTS
Nicolas Yuen:Accessibility API in Flex, nicolas yuen accessibility API in Flex
Nicolas Yuen : 17th Mar 2010
View Podcast: Accessibility API in Flex,
Chris Parsons:Software Craftsmanship Ideas & Eden, Software Craftsmanship Ideas & Eden
Chris Parsons : 10th Mar 2010
View Podcast: Software Craftsmanship Ideas & Eden,
Corey Haines:Software Craftsmanship Terminology, Software Craftsmanship Terminology
Corey Haines : 10th Mar 2010
View Podcast: Software Craftsmanship Terminology,
Cagatay Civici:PrimeFaces: Next Generation JSF Component Suite, PrimeFaces: Next Generation JSF Componen
Cagatay Civici : 3rd Mar 2010
View Podcast: PrimeFaces: Next Generation JSF Component Suite,
Karl Widmer:Integrating JSF with Spring Web Flow, Integrating JSF with Spring Web Flow
Karl Widmer : 3rd Mar 2010
View Podcast: Integrating JSF with Spring Web Flow,
Rick Evans:Flex and Spring Integration:Introducing Spring BlazeDS Integration, Flex and Spring Integration
Rick Evans : 17th Feb 2010
View Podcast: Flex and Spring Integration:Introducing Spring BlazeDS Integration,
Ian Robinson:Hydra and Hypermedia, Hydra and Hypermedia
Ian Robinson : 11th Feb 2010
View Podcast: Hydra and Hypermedia,
Paul Ardeleanu:Rails & iPhone Integration , Rails & iPhone Integration
Paul Ardeleanu : 10th Feb 2010
View Podcast: Rails & iPhone Integration ,
Alex  MacCaw:Bowline: A Ruby GUI Framework, Bowline: A Ruby GUI Framework
Alex MacCaw : 10th Feb 2010
View Podcast: Bowline: A Ruby GUI Framework,
Anup Narkhede:Architecture of Birdpie, a Twitter Application, Architecture of Birdpie, a Twitter Appli
Anup Narkhede : 10th Feb 2010
View Podcast: Architecture of Birdpie, a Twitter Application,
Murray Steele:Fibers in Ruby 1.9, Fibers in Ruby 1.9
Murray Steele : 10th Feb 2010
View Podcast: Fibers in Ruby 1.9,
Murray Steele:Introduction, Introduction
Murray Steele : 10th Feb 2010
View Podcast: Introduction,
Joel Chippindale:Show Off, a Ruby-Based HTML Presentation Software, Show Off, a Ruby-Based HTML Presentation
Joel Chippindale : 10th Feb 2010
View Podcast: Show Off, a Ruby-Based HTML Presentation Software,
Brent  Snook:Decorating the Domain - Wrapping Polymorphic Presentation Logic Around the Model, Decorating the Domain
Brent Snook : 10th Feb 2010
View Podcast: Decorating the Domain - Wrapping Polymorphic Presentation Logic Around the Model,
Ismael Celis:Using Websockets with EventMachine, Using Websockets with EventMachine
Ismael Celis : 10th Feb 2010
View Podcast: Using Websockets with EventMachine,
OTHER RIA, AJAX & WEB EVENTS
:Object-Oriented ActionScript - Beginners,  Object-Oriented ActionScript - Beginners
1 DAY COURSE.
Paris, Tuesday, March 30th
:Introduction to Adobe Flex,  Adobe Flex Intro
1 DAY COURSE.
Paris, Tuesday, April 13th
Alan Cassar:Developing Mobile Applications with Android,  Android Mobile App Development
3 DAY COURSE. Featuring Alan Cassar
London, Wednesday, April 14th
:Adobe Flex for Flash Developers,  Adobe Flex for Flash Developers
1 DAY COURSE.
Paris, Monday, April 19th
Andrew Chalkley:Core RoR: Web Development With Ruby on Rails,  Ruby on Rails Web Development
4 DAY COURSE. Featuring Andrew Chalkley
Paris, Tuesday, April 20th
:Developing Mobile Applications with Android,  Android Mobile App Development
3 DAY COURSE.
Paris, Wednesday, April 21st
Peter Lubbers:HTML5 Communication: Using Web Sockets and more to build real-time Web applications,  HTML5 Communication: Using Web Sockets & more too
3 DAY COURSE. Featuring Peter Lubbers
London, Wednesday, April 21st
:Beginning Adobe AIR - Building your first applications,  Adobe AIR Intro
1 DAY COURSE.
Paris, Monday, April 26th
© Copyright 2003-2010, Skills Matter Ltd
  Web development by You In Control
About Us  Jobs  Find Us  Meeting & Training Rooms  Newsletter  Community  Community-FR  Apress  1st Teach  Jobs: Sales Executive  Jobs: Student Podcaster  jobs - marketing assistant  Spring Certification