Transverse Mercator projection. More...
#include <TransverseMercator.hpp>
Public Member Functions | |
void | Forward (real lon0, real lat, real lon, real &x, real &y) const |
void | Forward (real lon0, real lat, real lon, real &x, real &y, real &gamma, real &k) const |
void | Reverse (real lon0, real x, real y, real &lat, real &lon) const |
void | Reverse (real lon0, real x, real y, real &lat, real &lon, real &gamma, real &k) const |
TransverseMercator (real a, real f, real k0) | |
Inspector functions | |
Math::real | MajorRadius () const |
Math::real | Flattening () const |
Math::real | CentralScale () const |
Static Public Member Functions | |
static const TransverseMercator & | UTM () |
Private Types | |
typedef Math::real | real |
Private Attributes | |
real | _a |
real | _a1 |
real | _alp [maxpow_+1] |
real | _b1 |
real | _bet [maxpow_+1] |
real | _c |
real | _e2 |
real | _e2m |
real | _es |
real | _f |
real | _k0 |
real | _n |
Static Private Attributes | |
static const int | maxpow_ = GEOGRAPHICLIB_TRANSVERSEMERCATOR_ORDER |
static const int | numit_ = 5 |
Friends | |
class | Ellipsoid |
Transverse Mercator projection.
This uses Krüger's method which evaluates the projection and its inverse in terms of a series. See
Krüger's method has been extended from 4th to 6th order. The maximum error is 5 nm (5 nanometers), ground distance, for all positions within 35 degrees of the central meridian. The error in the convergence is 2 × 10−15" and the relative error in the scale is 6 × 10−12%%. See Sec. 4 of arXiv:1002.1417 for details. The speed penalty in going to 6th order is only about 1%.
There's a singularity in the projection at φ = 0°, λ − λ0 = ±(1 − e)90° (≈ ±82.6° for the WGS84 ellipsoid), where e is the eccentricity. Beyond this point, the series ceases to converge and the results from this method will be garbage. To be on the safe side, don't use this method if the angular distance from the central meridian exceeds (1 − 2e)90° (≈ 75° for the WGS84 ellipsoid)
TransverseMercatorExact is an alternative implementation of the projection using exact formulas which yield accurate (to 8 nm) results over the entire ellipsoid.
The ellipsoid parameters and the central scale are set in the constructor. The central meridian (which is a trivial shift of the longitude) is specified as the lon0 argument of the TransverseMercator::Forward and TransverseMercator::Reverse functions. The latitude of origin is taken to be the equator. There is no provision in this class for specifying a false easting or false northing or a different latitude of origin. However these are can be simply included by the calling function. For example, the UTMUPS class applies the false easting and false northing for the UTM projections. A more complicated example is the British National Grid (EPSG:7405) which requires the use of a latitude of origin. This is implemented by the GeographicLib::OSGB class.
This class also returns the meridian convergence gamma and scale k. The meridian convergence is the bearing of grid north (the y axis) measured clockwise from true north.
See TransverseMercator.cpp for more information on the implementation.
See transversemercator for a discussion of this projection.
Example of use:
TransverseMercatorProj is a command-line utility providing access to the functionality of TransverseMercator and TransverseMercatorExact.
Definition at line 93 of file TransverseMercator.hpp.
|
private |
Definition at line 95 of file TransverseMercator.hpp.
Constructor for a ellipsoid with
[in] | a | equatorial radius (meters). |
[in] | f | flattening of ellipsoid. Setting f = 0 gives a sphere. Negative f gives a prolate ellipsoid. |
[in] | k0 | central scale factor. |
GeographicErr | if a, (1 − f) a, or k0 is not positive. |
Definition at line 45 of file src/TransverseMercator.cpp.
|
inline |
Definition at line 187 of file TransverseMercator.hpp.
|
inline |
Definition at line 181 of file TransverseMercator.hpp.
|
inline |
TransverseMercator::Forward without returning the convergence and scale.
Definition at line 153 of file TransverseMercator.hpp.
void GeographicLib::TransverseMercator::Forward | ( | real | lon0, |
real | lat, | ||
real | lon, | ||
real & | x, | ||
real & | y, | ||
real & | gamma, | ||
real & | k | ||
) | const |
Forward projection, from geographic to transverse Mercator.
[in] | lon0 | central meridian of the projection (degrees). |
[in] | lat | latitude of point (degrees). |
[in] | lon | longitude of point (degrees). |
[out] | x | easting of point (meters). |
[out] | y | northing of point (meters). |
[out] | gamma | meridian convergence at point (degrees). |
[out] | k | scale of projection at point. |
No false easting or northing is added. lat should be in the range [−90°, 90°].
Definition at line 350 of file src/TransverseMercator.cpp.
|
inline |
Definition at line 175 of file TransverseMercator.hpp.
|
inline |
TransverseMercator::Reverse without returning the convergence and scale.
Definition at line 162 of file TransverseMercator.hpp.
void GeographicLib::TransverseMercator::Reverse | ( | real | lon0, |
real | x, | ||
real | y, | ||
real & | lat, | ||
real & | lon, | ||
real & | gamma, | ||
real & | k | ||
) | const |
Reverse projection, from transverse Mercator to geographic.
[in] | lon0 | central meridian of the projection (degrees). |
[in] | x | easting of point (meters). |
[in] | y | northing of point (meters). |
[out] | lat | latitude of point (degrees). |
[out] | lon | longitude of point (degrees). |
[out] | gamma | meridian convergence at point (degrees). |
[out] | k | scale of projection at point. |
No false easting or northing is added. The value of lon returned is in the range [−180°, 180°].
Definition at line 516 of file src/TransverseMercator.cpp.
|
static |
A global instantiation of TransverseMercator with the WGS84 ellipsoid and the UTM scale factor. However, unlike UTM, no false easting or northing is added.
Definition at line 277 of file src/TransverseMercator.cpp.
|
friend |
Definition at line 101 of file TransverseMercator.hpp.
|
private |
Definition at line 98 of file TransverseMercator.hpp.
|
private |
Definition at line 100 of file TransverseMercator.hpp.
Definition at line 100 of file TransverseMercator.hpp.
|
private |
Definition at line 100 of file TransverseMercator.hpp.
Definition at line 100 of file TransverseMercator.hpp.
|
private |
Definition at line 98 of file TransverseMercator.hpp.
|
private |
Definition at line 98 of file TransverseMercator.hpp.
|
private |
Definition at line 98 of file TransverseMercator.hpp.
|
private |
Definition at line 98 of file TransverseMercator.hpp.
|
private |
Definition at line 98 of file TransverseMercator.hpp.
|
private |
Definition at line 98 of file TransverseMercator.hpp.
|
private |
Definition at line 98 of file TransverseMercator.hpp.
|
staticprivate |
Definition at line 96 of file TransverseMercator.hpp.
|
staticprivate |
Definition at line 97 of file TransverseMercator.hpp.