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`.

See Also: `TMExact(real a, real f, real k0, bool extendp)`.

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_`, `attrs`, `classof`, `copy`, `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).
| equatoradius Get the equatorial (major) radius, semi-axis (`meter`).
| majoradius DEPRECATED, use `equatoradius`.
| extendp Get using the extended domain (`bool`).
| flattening Get the flattening (`float`).
| iteration Get the most recent `ExactTransverseMercator.forward` or `ExactTransverseMercator.reverse` iteration number (`int` or `0` 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`).
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 datum, ellipsoid to use (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple). `lon0` - The central meridian (`degrees180`). `k0` - The central scale factor (`float`). `extendp` - Use the extended domain (`bool`). `name` - Optional name for the projection (`str`). Raises: `EllipticError` - No convergence. `ETMError` - Invalid `k0`. `TypeError` - Invalid `datum`. `ValueError` - Invalid `lon0` or `k0`. Overrides: object.__init__ 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).

### 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`). Returns: EasNorExact4Tuple`(easting, northing, convergence, scale)` in `meter`, `meter`, `degrees` and `scalar`. Raises: `EllipticError` - No convergence. 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`). Returns: LatLonExact4Tuple`(lat, lon, convergence, scale)` in `degrees`, `degrees180`, `degrees` and `scalar`. Raises: `EllipticError` - No convergence. 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. Raises: `AssertionError` - Always, see function notOverloaded. 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).

### equatoradius Get the equatorial (major) radius, semi-axis (`meter`). Get method: equatoradius(self) - Get the equatorial (major) radius, semi-axis (`meter`). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### majoradius DEPRECATED, use `equatoradius`. Get method: equatoradius(self) - Get the equatorial (major) radius, semi-axis (`meter`). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### extendp Get using the extended domain (`bool`). Get method: extendp(self) - Get using the extended domain (`bool`). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### flattening Get the flattening (`float`). Get method: flattening(self) - Get the flattening (`float`). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### iteration Get the most recent `ExactTransverseMercator.forward` or `ExactTransverseMercator.reverse` iteration number (`int` or `0` if not available/applicable). Get method: iteration(self) - Get the most recent `ExactTransverseMercator.forward` or `ExactTransverseMercator.reverse` iteration number (`int` or `0` if not available/applicable). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### 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`).