1GIS::Distance::HaversinUes(e3rpmC)ontributed Perl DocumeGnItSa:t:iDoinstance::Haversine(3pm)
2
3
4

NAME

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

DESCRIPTION

9       This is the default distance calculation for GIS::Distance as it keeps
10       a good balance between speed and accuracy.
11
12       A faster (XS) version of this formula is available as
13       GIS::Distance::Fast::Haversine.
14
15       Normally this module is not used directly.  Instead GIS::Distance is
16       used which in turn interfaces with the various formula classes.
17

FORMULA

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

SEE ALSO

26       •   <http://mathforum.org/library/drmath/view/51879.html>
27
28       •   <http://www.faqs.org/faqs/geography/infosystems-faq/>
29

SUPPORT

31       See "SUPPORT" in GIS::Distance.
32

AUTHORS

34       See "AUTHORS" in GIS::Distance.
35

LICENSE

37       See "LICENSE" in GIS::Distance.
38
39
40
41perl v5.34.0                      2022-01-21     GIS::Distance::Haversine(3pm)
Impressum