Forward to Code organization. Up to Contents. GeographicLib offers a C++ interfaces to a small (but important!) set of geographic transformations. It grew out of a desire to improve on the geotrans package for transforming between geographic and MGRS coordinates. At present, GeographicLib provides UTM, UPS, MGRS, geocentric, and local cartesian projections, and classes for geodesic calculations.
The goals of GeographicLib are:
- Accuracy. In most applications the accuracy is close to round-off, about 5 nm. Even though in many geographic applications 1 cm is considered "accurate enough", there is little penalty in providing much better accuracy. If situations where a faster approximate algorithm is necessary, GeographicLib offers an accurate benchmark to guide the development.
- Completeness. For each of the projections included, an attempt is made to provide a complete solution. For example, GeographicLib::Geodesic::Inverse works for anti-podal points. Similarly, GeographicLib::Geocentric.Reverse will return accurate geodetic coordinates even for points close to the center of the earth.
- C++ interface. For the projection methods, this allows encapsulation of the ellipsoid parameters.
- Emphasis on projections necessary for analysing military data.
- Uniform treatment of UTM/UPS. The GeographicLib::UTMUPS class treats UPS as zone 0. This simplifies conversions between UTM and UPS coordinates, etc.
- Well defined and stable conventions for the conversion between UTM/UPS to MGRS coordinates.
- Detailed internal documentation on the algorithms. For the most part GeographicLib uses published algorithms and references are given. If changes have been made (usually to improve the numerical accuracy), these are described in the code.
Various Utility Programs are provided with the library. These illustrate the use of the library and are useful in their own right. This library and the utilities have been tested with g++ 4.3 under Linux and with MS Visual Studio 2005
The section Transverse Mercator Projection documents various properties of this projection.
Undoubtedly, bugs lurk in this code and in the documentation. Please report any you find to <charles@karney.com>.
Forward to Getting Started. Up to Contents.