NAME
GIS::Distance::Polar - Polar coordinate flat-earth distance calculations.
SYNOPSIS
my $calc = GIS::Distance::Polar->new();
my $distance = $calc->distance( $lon1, $lat1 => $lon2, $lat2 );
DESCRIPTION
Supposedly this is a formula to better calculate distances at the poles.
While implimented, this formula has not been tested much. If you use it PLEASE share your results with the author.
FORMULA
a = pi/2 - lat1
b = pi/2 - lat2
c = sqrt( a^2 + b^2 - 2 * a * b * cos(lon2 - lon1) )
d = R * c
METHODS
distance
my $distance = $calc->distance( $lon1, $lat1 => $lon2, $lat2 );
This method accepts two lat/lon sets (in decimal degrees) and returns a Class::Measure::Length object containing the distance between the two points.
AUTHOR
Aran Clary Deltac <bluefeet@cpan.org>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.