Package pygeodesy :: Module etm :: Class ExactTransverseMercator |
[frames] | no frames]

# Class ExactTransverseMercator

      object --+
               |
    named._Named --+
                   |
    named._NamedBase --+
                       |
                      ExactTransverseMercator

A Python version of Karney's TransverseMercatorExact C++ class, a numerically exact transverse Mercator projection, here referred to as `TMExact`.

Instance Methods
__init__(self, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, lon0=0, k0=0.9996, extendp=True, name='') New ExactTransverseMercator projection. |
forward(self, lat, lon, lon0=None) Forward projection, from geographic to transverse Mercator. |
reverse(self, x, y, lon0=None) Reverse projection, from Transverse Mercator to geographic. |
toStr(self, **kwds) Return a `str` representation. |
Inherited from `named._NamedBase`: `__repr__`, `__str__`, `others`, `toRepr` Inherited from `named._Named`: `_DOT_`, `__imatmul__`, `__matmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `rename`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| datum Property to get and set the datum (Datum).
| ellipsoid Get the ellipsoid (Ellipsoid) or `None`.
| _e_PI_4_ (INTERNAL) Get and cache `- _e * PI / 4`.
| equatoradius Get the `ellipsoid`'s equatorial radius, semi-axis (`meter`).
| extendp Get using the extended or standard domain (`bool`).
| flattening Get the `ellipsoid`'s flattening (`float`).
| iteration Get the most recent `ExactTransverseMercator.forward` or `ExactTransverseMercator.reverse` iteration number (`int`) or `None` if not available/applicable.
| k0 Property to get and set the central scale factor (`float`).
| lon0 Property to get and set the central meridian (`degrees180`).
| majoradius DEPRECATED, use property `equatoradius`.
Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4` Inherited from `object`: `__class__`

Method Details

### __init__ (self, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, lon0=0, k0=0.9996, extendp=True, name='') (Constructor) |
New ExactTransverseMercator projection. Arguments: `datum` - The non-spherical datum or ellipsoid (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple). `lon0` - The central meridian (`degrees180`). `k0` - The central scale factor (`float`). `extendp` - Use the extended or standard domain (`bool`). `name` - Optional name for the projection (`str`). Raises: `ETMError` - Invalid `lon0` or `k0` or near-spherical `datum` or `ellipsoid`. `TypeError` - Invalid or near-spherical `datum`. Overrides: object.__init__ See Also: Constructor TransverseMercatorExact<https://GeographicLib.SourceForge.io/ html/classGeographicLib_1_1TransverseMercatorExact.html for more details, especially on extendp. Note: The maximum error for all 255.5K TMcoords.dat tests (with `0 <= lat <= 84` and `0 <= lon`) is `5.2e-08 .forward` or 52 nano-meter easting and northing and `3.8e-13 .reverse` or 0.38 pico-degrees lat- and longitude (with Python 3.7.3+, 2.7.16+, PyPy6 3.5.3 and PyPy6 2.7.13, all in 64-bit on macOS 10.13.6 High Sierra `x86_64` and 12.2 Monterey `arm64` and `"arm64_x86_64"`).

### forward (self, lat, lon, lon0=None) |
Forward projection, from geographic to transverse Mercator. Arguments: `lat` - Latitude of point (`degrees`). `lon` - Longitude of point (`degrees`). `lon0` - Central meridian of the projection (`degrees`), overriding the default. Returns: EasNorExact4Tuple`(easting, northing, convergence, scale)` in `meter`, `meter`, `degrees` and `scalar`. Raises: `EllipticError` - No convergence transforming to ETM east- and northing. See Also: `void TMExact::Forward(real lon0, real lat, real lon, real &x, real &y, real &gamma, real &k)`.

### reverse (self, x, y, lon0=None) |
Reverse projection, from Transverse Mercator to geographic. Arguments: `x` - Easting of point (`meters`). `y` - Northing of point (`meters`). `lon0` - Central meridian of the projection (`degrees`), overriding the default. Returns: LatLonExact4Tuple`(lat, lon, convergence, scale)` in `degrees`, `degrees180`, `degrees` and `scalar`. Raises: `EllipticError` - No convergence transforming to lat- and longitude. See Also: `void TMExact::Reverse(real lon0, real x, real y, real &lat, real &lon, real &gamma, real &k)`

### toStr (self, **kwds) |
Return a `str` representation. Arguments: `kwds` - Optional, overriding keyword arguments. Overrides: named._Named.toStr

Property Details

### datum Property to get and set the datum (Datum). Get method: datum(self) - Get the datum (Datum) or `None`. Set method: datum(self, datum) - Set the datum and ellipsoid (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple).

### ellipsoid Get the ellipsoid (Ellipsoid) or `None`. Get method: ellipsoid(self) - Get the ellipsoid (Ellipsoid) or `None`. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### _e_PI_4_ (INTERNAL) Get and cache `- _e * PI / 4`. Get method: _e_PI_4_(self) - (INTERNAL) Get and cache `- _e * PI / 4`. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### equatoradius Get the `ellipsoid`'s equatorial radius, semi-axis (`meter`). Get method: equatoradius(self) - Get the `ellipsoid`'s equatorial radius, semi-axis (`meter`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### extendp Get using the extended or standard domain (`bool`). Get method: extendp(self) - Get using the extended or standard domain (`bool`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### flattening Get the `ellipsoid`'s flattening (`float`). Get method: flattening(self) - Get the `ellipsoid`'s flattening (`float`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### iteration Get the most recent `ExactTransverseMercator.forward` or `ExactTransverseMercator.reverse` iteration number (`int`) or `None` if not available/applicable. Get method: iteration(self) - Get the most recent `ExactTransverseMercator.forward` or `ExactTransverseMercator.reverse` iteration number (`int`) or `None` if not available/applicable. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### k0 Property to get and set the central scale factor (`float`). Get method: k0(self) - Get the central scale factor (`float`), aka `scale0`. Set method: k0(self, k0) - Set the central scale factor (`float`), aka `scale0`.

### lon0 Property to get and set the central meridian (`degrees180`). Get method: lon0(self) - Get the central meridian (`degrees180`). Set method: lon0(self, lon0) - Set the central meridian (`degrees180`).

### majoradius DEPRECATED, use property `equatoradius`. Get method: majoradius(self) - DEPRECATED, use property `equatoradius`. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.