GeographicLib  1.45
GeographicLib library
Charles F. F. Karney (


GeographicLib is a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for gravity (e.g., EGM2008), geoid height and geomagnetic field (e.g., WMM2015) calculations, and for solving geodesic problems. The emphasis is on returning accurate results with errors close to round-off (about 5–15 nanometers). Accurate algorithms for Geodesics on an ellipsoid of revolution and Transverse Mercator projection have been developed for this library. The functionality of the library can be accessed from user code, from the Utility programs provided, or via the Implementations in other languages. Also included is a .NET wrapper library NETGeographicLib which exposes the functionality to .NET applications. For a sample of the geodesic capabilities in JavaScript, check out the online geodesic calculator and the script for displaying geodesics in Google Maps

This library is not a general purpose projection library; use proj.4 for that. On the other hand, it does provide the core functionality offered by GEOTRANS.


The main project page is at

The code is available for download at

as either a compressed tar file (tar.gz) or a zip file. (The two archives have identical contents, except that the zip file has DOS line endings.) Alternatively you can get the latest release using git

  git clone git:// geographiclib

Each release is tagged, e.g., with r1.45. There are also binary installers available for some platforms. See Using a binary installer.

GeographicLib is licensed under the MIT/X11 License; see LICENSE.txt for the terms. For more information, see


Forward to Introduction.