1GIS::Distance::Cosine(3Upsme)r Contributed Perl DocumentaGtIiSo:n:Distance::Cosine(3pm)
2
3
4

NAME

6       GIS::Distance::Cosine - Spherical law of cosines distance calculations.
7

DESCRIPTION

9       Although this formula is mathematically exact, it is unreliable for
10       small distances.  See GIS::Distance::MathTrig for related details.
11
12       A faster (XS) version of this formula is available as
13       GIS::Distance::Fast::Cosine.
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           a = sin(lat1) * sin(lat2)
20           b = cos(lat1) * cos(lat2) * cos(lon2 - lon1)
21           c = arccos(a + b)
22           d = R * c
23

SEE ALSO

25       ยท   <https://en.wikipedia.org/wiki/Spherical_law_of_cosines>
26

SUPPORT

28       See "SUPPORT" in GIS::Distance.
29

AUTHORS

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

LICENSE

34       See "LICENSE" in GIS::Distance.
35
36
37
38perl v5.32.1                      2021-02-01        GIS::Distance::Cosine(3pm)
Impressum