kaupert

Description goes here. How to use the Kaupert gem?

gem install json/pure gem install kaupert

Once both the gems are installed. The gem can be tested as following:-

Open up the Interactive Ruby Terminal irb> require ‘rubygems’ irb> require ‘kaupert’

Create the object for first address using reverse geocoding i.e through latitude and longitude:- irb> a= Kaupert::Geocoders::GoogleGeocoder3.reverse_geocode(“49.93162,8.64288”)

Here the lat and long corresponds to Rebusgasse 3, 64291 Darmstadt, Germany

To find out whether call was successfull : irb> a.success

> true

Create the object for the second address based on address irb>b= Kaupert::Geocoders::GoogleGeocoder3.geocode(“Untergasse 1,64291 Darmstadt, Germany”) irb>b.ll

>“49.9334,8.64154”

To check whether the geocoding was successfull irb> b.success

> true

To calculate the distance between a and b in miles: irb(main):042:0> a.distance_to(b)

> 0.136817906674354

Contributing to kaupert

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2011 Abhishek Gupta. See LICENSE.txt for further details.