GIS::Distance::Cosine - Spherical law of cosines distance calculations.
Although this formula is mathematically exact, it is unreliable for
small distances. See the GIS::Distance::MathTrig manpage for related details.
A faster (XS) version of this formula is available as
the GIS::Distance::Fast::Cosine manpage.
Normally this module is not used directly. Instead the GIS::Distance manpage
is used which in turn interfaces with the various formula classes.
a = sin(lat1) * sin(lat2)
b = cos(lat1) * cos(lat2) * cos(lon2 - lon1)
c = arccos(a + b)
d = R * c
See SUPPORT in the GIS::Distance manpage.
See AUTHORS in the GIS::Distance manpage.
See LICENSE in the GIS::Distance manpage.
|