GeographicLib: TransverseMercator.cpp File Reference

GeographicLib 2.5

Loading...
Searching...
No Matches
Namespaces
TransverseMercator.cpp File Reference

Implementation for GeographicLib::TransverseMercator class. More...

`#include <complex>`
`#include <GeographicLib/TransverseMercator.hpp>`

Go to the source code of this file.

## Namespaces
namespace | GeographicLib
| Namespace for GeographicLib.

## Detailed Description

Implementation for GeographicLib::TransverseMercator class.

Copyright (c) Charles Karney (2008-2023) karne.nosp@m.y@al.nosp@m.um.mi.nosp@m.t.ed.nosp@m.u and licensed under the MIT/X11 License. For more information, see https://geographiclib.sourceforge.io/

This implementation follows closely JHS 154, ETRS89 - järjestelmään liittyvät karttaprojektiot, tasokoordinaatistot ja karttalehtijako (Map projections, plane coordinates, and map sheet index for ETRS89), published by JUHTA, Finnish Geodetic Institute, and the National Land Survey of Finland (2006).

The relevant section is available as the 2008 PDF file http://docs.jhs-suositukset.fi/jhs-suositukset/JHS154/JHS154_liite1.pdf

This is a straight transcription of the formulas in this paper with the following exceptions:

- use of 6th order series instead of 4th order series. This reduces the error to about 5nm for the UTM range of coordinates (instead of 200nm), with a speed penalty of only 1%;
- use Newton's method instead of plain iteration to solve for latitude in terms of isometric latitude in the Reverse method;
- use of Horner's representation for evaluating polynomials and Clenshaw's method for summing trigonometric series;
- several modifications of the formulas to improve the numerical accuracy;
- evaluating the convergence and scale using the expression for the projection or its inverse.

If the preprocessor variable GEOGRAPHICLIB_TRANSVERSEMERCATOR_ORDER is set to an integer between 4 and 8, then this specifies the order of the series used for the forward and reverse transformations. The default value is 6. (The series accurate to 12th order is given in Series approximation for transverse Mercator.)

Definition in file TransverseMercator.cpp.