Documentation ¶
Overview ¶
Package geodist implements the Haversine and Vincenty methods for calculating geographical distances between points on the surface of the Earth.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HaversineDistance ¶
HaversineDistance returns the geographical distance in km between the points p1 and p2 using the Haversine formula. The surface of the Earth is approximated by a sphere with a radius of 6371 km.
func VincentyDistance ¶
VincentyDistance returns the geographical distance in km between the points p1 and p2 using Vincenty's inverse formula. The surface of the Earth is approximated by the WGS-84 ellipsoid. This method may fail to converge for nearly antipodal points.
Types ¶
Click to show internal directories.
Click to hide internal directories.