Created
November 26, 2011 06:21
-
-
Save hisaichi5518/1395166 to your computer and use it in GitHub Desktop.
Data::Wheren使ってみた。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Data::Wheren::7Bit; | |
sub say { | |
print @_, "\n"; | |
} | |
my $wheren = Data::Wheren::7Bit->new; | |
my $lat = 35.3137; | |
my $lon = 139.4863; | |
my $epoch_time = time; | |
my $level = 7; | |
my $hash = $wheren->encode( $lat, $lon, $epoch_time, $level ); | |
($lat, $lon, $epoch_time) = $wheren->decode( $hash ); | |
say $lat; | |
say $lon; | |
say $epoch_time; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment