Geo::Hashing - Perl library to calculate Geohashing points
use Geo::Hashing; my $g = new Geo::Hashing(lat => 37, lon => -122, date => "2008-05-24"); printf "Today's location is at %.6f, %.6f.\n", $g->lat, $g->lon;
This module allows calculating the locaiton of Geohashes as described in http://wiki.xkcd.com/geohashing/Main_Page.
Create a new Geo::Hashing object.
Set or get the points latitude. When settings, only the integer portion is considered. Set to undef to just get the offset.
Set or get the points longitude. When settings, only the integer portion is considered. Set to undef to just get the offset.
Set or get the date used for the calculation. Note that this is the actual date of the meetup in question, even when the 30w rule is in effect.
Set or get the Dow Jones Industrial Average used for the calculation. If not set, it will be automatically retrieved depending on the value of $self->source.
Set the source of the DJIA opening data. Will load Geo::Hashing::Source::Name and call get_djia($date). See Geo::Hashing::Source::Random for a sample.
Set or get the 30w flag. Will be set automatically if lon is set and is greater than -30.
Enable or disable diagnostic logging
Original comic: http://www.xkcd.com/426/
Wiki: http://wiki.xkcd.com/geohashing/Main_Page
IRC: irc://irc.xkcd.com/geohashing
Dan Boger, <zigdon@gmail.com>
Copyright (C) 2008 by Dan Boger
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
To install Geo::Hashing, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Hashing
CPAN shell
perl -MCPAN -e shell install Geo::Hashing
For more information on module installation, please visit the detailed CPAN module installation guide.