GIS::Distance::Haversine(3pm)

GIS::Distance::Haversine3pm

Exact spherical distance calculations.

Overview

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

A faster (XS) version of this formula is available as GIS::Distance::Fast::Haversine.

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

Support

See "SUPPORT" in GIS::Distance.

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

Authors

See "AUTHORS" in GIS::Distance.

License

See "LICENSE" in GIS::Distance.

From libgis-distance-perl 0.20-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.