NAME

GIS::Distance::Haversine - Exact spherical distance calculations.

SYNOPSIS

my $calc = GIS::Distance::Haversine->new();
my $distance = $calc->distance( $lon1, $lat1 => $lon2, $lat2 );

DESCRIPTION

FORMULA

dlon = lon2 - lon1
dlat = lat2 - lat1
a = (sin(dlat/2))^2 + cos(lat1) * cos(lat2) * (sin(dlon/2))^2
c = 2 * atan2( sqrt(a), sqrt(1-a) )
d = R * c 

RESOURCES

http://mathforum.org/library/drmath/view/51879.html

http://www.faqs.org/faqs/geography/infosystems-faq/

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.