API Reference distance v1.1.1

Modules

Basic distance calculations for cartesian coordinates for calculting distances on a single plane. If you are looking to calculating distance on the surface of Earth, check out the Distance.GreatCircle module.

Calculate great circle distances (shortest travel distance on the surface of a spherical Earth) given a two longitude-latitude pairs. This is an implementation of the Haversine formula and approximates using a spherical (non-ellipsoid) Earth with a mean radius of 6,371,008.8 meters derived from the WGS84 datum.

Calculate distance per Vincenty's inverse formula (shortest travel distance on the surface of an oblate spheroid Earth) given two longitude-latitude pairs.