= earthtools

* http://earthtools.rubyforge.org

== DESCRIPTION:

The Earthtools Gem provides a library for consuming the web services provided by "Earthtools":http://www.earthtools.org/. More information on the Developer API may be found "here":http://www.earthtools.org/webservices.htm. This API may be used obtain geographical information such as timezones, sunrise and sunset times as well as height/elevation for a set of latitude and longitude coordinates.

There are a couple of limitations to consider (refer to the Earthtools website for any changes):

* You must not make more than one request per second to these webservices
* You must cache results if you believe that you will need to make another identical request within any 24-hour period
* You must delete any cached data when you no longer need it and in any case after 14 days. You should then make a new request for the data in line with the previous two rules. If you wish to keep access to data I am able to license the data for use in this way

== FEATURES/PROBLEMS:

* FIX (list of features or problems)

== SYNOPSIS:

require 'rubygems'
require 'earthtools'

#Obtain the timezone details using a latitude and longitude coordinate
#More info here:
#http://www.earthtools.org/webservices.htm#timezone
tz_data = Earthtools.timezone({ "latitude" => "36.454062",
"longitude" => "-122.224081" })

#Obtain the sunrise and sunset details using a latitude and longitude coordinate
#More info here:
#http://www.earthtools.org/webservices.htm#sun
tz_data = Earthtools.sunrise_sunset({ "latitude" => "37.793915",
"longitude" => "-122.402909",
"day" => "4",
"month" => "12",
"timezone" => "-8",
"dst" => "0" })

#Obtain the height details using a latitude and longitude coordinate
#More info here:
#http://www.earthtools.org/webservices.htm#height
tz_data = Earthtools.height({ "latitude" => "36.454062",
"longitude" => "-122.224081" })

== REQUIREMENTS:

* xmlsimple rest_client ruby-units

== INSTALL:

* sudo gem install earthtools

== LICENSE:

(LGPL v3)

Copyright (c) 2008 Jason Goecke

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.