Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

GIS::Distance::Cosine

Name GIS::Distance::Cosine
Version 0.20
Located at /usr/share/perl5/vendor_perl
File /usr/share/perl5/vendor_perl/GIS/Distance/Cosine.pm
Is Core No
Search CPAN for this module GIS::Distance::Cosine
Documentation GIS::Distance::Cosine
Module Details GIS::Distance::Cosine


NAME

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


DESCRIPTION

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.


FORMULA

    a = sin(lat1) * sin(lat2)
    b = cos(lat1) * cos(lat2) * cos(lon2 - lon1)
    c = arccos(a + b)
    d = R * c


SEE ALSO


SUPPORT

See SUPPORT in the GIS::Distance manpage.


AUTHORS

See AUTHORS in the GIS::Distance manpage.


LICENSE

See LICENSE in the GIS::Distance manpage.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2025