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

# Class ExactTransverseMercator

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

Pure Python version of Karney's C++ class TransverseMercatorExact, a numerically exact transverse Mercator projection, abbreviated as `TMExact`.

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

Properties
| datum Class `property` with a `.name` attribute.
| ellipsoid Get the ellipsoid (Ellipsoid).
| equatoradius Get the `ellipsoid`'s equatorial radius, semi-axis (`meter`).
| a Get the `ellipsoid`'s equatorial radius, semi-axis (`meter`).
| extendp Get the domain (`bool`), extended or standard.
| flattening Get the `ellipsoid`'s flattening (`scalar`).
| f Get the `ellipsoid`'s flattening (`scalar`).
| iteration Get the most recent `ExactTransverseMercator.forward` or `ExactTransverseMercator.reverse` iteration number (`int`) or `None` if not available/applicable.
| k0 Class `property` with a `.name` attribute.
| lon0 Class `property` with a `.name` attribute.
| majoradius DEPRECATED, use property `equatoradius`.
| raiser Class `property` with a `.name` attribute.
Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof`, `typename` Inherited from `object`: `__class__`

Method Details

### __init__ (self, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, lon0=0, k0=0.9996, extendp=False, raiser=False, **name) (Constructor) |
New ExactTransverseMercator projection. Arguments: `datum` - The non-spherical datum or ellipsoid (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple). `lon0` - Central meridian, default (`degrees180`). `k0` - Central scale factor (`float`). `extendp` - If `True`, use the extended domain, standard otherwise (`bool`). `raiser` - If `True`, throw an ETMError for convergence failures (`bool`). `name` - Optional `name=NN` for the projection (`str`). Raises: `ETMError` - Near-spherical `datum` or `ellipsoid` or invalid `lon0` or `k0`. Overrides: object.__init__ See Also: Constructor TransverseMercatorExact for more details, especially on extendp. Note: For all 255.5K TMcoords.dat tests (with `0 <= lat <= 84` and `0 <= lon`) the maximum error 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, jam=False, **name) |
Forward projection, from geographic to transverse Mercator. Arguments: `lat` - Latitude of point (`degrees`). `lon` - Longitude of point (`degrees`). `lon0` - Central meridian (`degrees180`), overriding the default if not `None`. `jam` - If `True`, use the `Jacobi amplitude` otherwise `Bulirsch`' function (`bool`). `name` - Optional `name=NN` (`str`). Returns: Forward4Tuple`(easting, northing, gamma, scale)`. Raises: `ETMError` - No convergence, thrown iff property `raiser=True`. See Also: `void TMExact::Forward(real lon0, real lat, real lon, real &x, real &y, real &gamma, real &k)`.

### reset (self, lat0, lon0) |
Set the central parallel and meridian. Arguments: `lat0` - Latitude of the central parallel (`degrees90`). `lon0` - Longitude of the central meridian (`degrees180`). Returns: 2-Tuple `(lat0, lon0)` of the previous central parallel and meridian. Raises: `ETMError` - Invalid `lat0` or `lon0`.

### reverse (self, x, y, lon0=None, jam=False, **name) |
Reverse projection, from Transverse Mercator to geographic. Arguments: `x` - Easting of point (`meters`). `y` - Northing of point (`meters`). `lon0` - Optional central meridian (`degrees180`), overriding the default (`iff not None`). `jam` - If `True`, use the `Jacobi amplitude` otherwise `Bulirsch`' function (`bool`). `name` - Optional `name=NN` (`str`). Returns: Reverse4Tuple`(lat, lon, gamma, scale)`. Raises: `ETMError` - No convergence, thrown iff property `raiser=True`. See Also: `void TMExact::Reverse(real lon0, real x, real y, real &lat, real &lon, real &gamma, real &k)`

### toStr (self, joined=', ', **kwds) |
Return a `str` representation. Arguments: `joined` - Separator to join the attribute strings (`str` or `None` or `NN` for non-joined). `kwds` - Optional, overriding keyword arguments. Overrides: named._Named.toStr

Property Details

### datum Class `property` with a `.name` attribute. 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). Get method: ellipsoid(self) - Get the ellipsoid (Ellipsoid). 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.

### a 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 the domain (`bool`), extended or standard. Get method: extendp(self) - Get the domain (`bool`), extended or standard. 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 (`scalar`). Get method: flattening(self) - Get the `ellipsoid`'s flattening (`scalar`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### f Get the `ellipsoid`'s flattening (`scalar`). Get method: flattening(self) - Get the `ellipsoid`'s flattening (`scalar`). 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 Class `property` with a `.name` attribute. 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 Class `property` with a `.name` attribute. 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.

### raiser Class `property` with a `.name` attribute. Get method: raiser(self) - Get the error setting (`bool`). Set method: raiser(self, raiser) - Set the error setting (`bool`), if `True` throw an ETMError for convergence failures.