Package geographiclib is a wrapper around the GeographicLib library.
var ( // WGS84Spheroid represents the default WGS84 ellipsoid. WGS84Spheroid = NewSpheroid(6378137, 1/298.257223563) )
Spheroid is an object that can perform geodesic operations on a given spheroid.
NewSpheroid creates a spheroid from a radius and flattening.
AreaAndPerimeter computes the area and perimeter of a polygon on a given spheroid. The points must never be duplicated (i.e. do not include the "final" point of a Polygon LinearRing). Area is in meter^2, Perimeter is in meters.
Inverse solves the geodetic inverse problem on the given spheroid (https://en.wikipedia.org/wiki/Geodesy#Geodetic_problems). Returns s12 (distance in meters), az1 (azimuth at point 1) and az2 (azimuth at point 2).
InverseBatch computes the sum of the length of the lines represented by the line of points. This is intended for use for LineStrings. LinearRings/Polygons should use "AreaAndPerimeter". Returns the sum of the s12 (distance in meters) units.
Project returns computes the location of the projected point.
Using the direct geodesic problem from GeographicLib (Karney 2013).