Aran Clary Deltac > GIS-Distance-0.08 > GIS::Distance::Formula::Haversine

Download:
GIS-Distance-0.08.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.08   Source  

NAME ^

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

DESCRIPTION ^

This is the default distance calculation for GIS::Distance as it keeps a good balance between speed and accuracy.

Normally this module is not used directly. Instead GIS::Distance is used which in turn interfaces with the various formula classes.

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

METHODS ^

distance

This method is called by GIS::Distance's distance() method.

SEE ALSO ^

GIS::Distanc

GIS::Distance::Formula::Haversine::Fast

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.

syntax highlighting: