Package pygeodesy :: Module datum :: Class Transform |
[frames] | no frames]

# Class Transform

      object --+
               |
    named._Named --+
                   |
    named._NamedBase --+
                       |
    named._NamedEnumItem --+
                           |
                          Transform

Helmert transformation.

Instance Methods
__init__(self, name=`'````'`, tx=0, ty=0, tz=0, sx=0, sy=0, sz=0, s=0) New Transform. |
__eq__(self, other) Compare this and an other transform. |
inverse(self, name=`'````'`) Return the inverse of this transform. |
toStr(self, prec=5) Return this transform as a string. |
transform(self, x, y, z, inverse=False) Transform a (geocentric) Cartesian point, forward or inverse. |
Inherited from `named._NamedEnumItem`: `__ne__`, `unregister` Inherited from `named._NamedBase`: `__repr__`, `__str__`, `others`, `toStr2` Inherited from `named._Named`: `_dot_`, `attrs`, `classof`, `copy` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables
| tx = `0` X translation (`meter`).
| ty = `0` Y translation (`meter`).
| tz = `0` Z translation (`meter`).
| rx = `0` X rotation (`radians`).
| ry = `0` Y rotation (`radians`).
| rz = `0` Z rotation (`radians`).
| s = `0` Scale ppm (`float`).
| s1 = `1` Scale + 1 (`float`).
| sx = `0` X rotation (degree seconds).
| sy = `0` Y rotation (degree seconds).
| sz = `0` Z rotation (degree seconds).

Properties
Inherited from `named._NamedEnumItem`: `name` Inherited from `named._Named`: `classname`, `classnaming`, `named`, `named2` Inherited from `object`: `__class__`

Method Details

### __init__ (self, name=`'````'`, tx=0, ty=0, tz=0, sx=0, sy=0, sz=0, s=0) (Constructor) |
New Transform. Arguments: `name` - Optional, unique name (`str`). `tx` - Optional X translation (`meter`). `ty` - Optional Y translation (`meter`). `tz` - Optional Z translation (`meter`). `s` - Optional scale ppm (`float`). `sx` - Optional X rotation (`degree seconds`). `sy` - Optional Y rotation (`degree seconds`). `sz` - Optional Z rotation (`degree seconds`). Raises: `NameError` - Transform with that `name` already exists. Overrides: object.__init__

### __eq__ (self, other) (Equality operator) |
Compare this and an other transform. Arguments: `other` - The other transform (Transform). Returns: `True` if equal, `False` otherwise.

### inverse (self, name=`'````'`) |
Return the inverse of this transform. Arguments: `name` - Optional, unique name (`str`). Returns: Inverse (Transform). Raises: `NameError` - Transform with that `name` already exists.

### toStr (self, prec=5) |
Return this transform as a string. Arguments: `prec` - Optional number of decimals, unstripped (`int`). Returns: Transform attributes (`str`). Raises: `AssertionError` - Always, see function notOverloaded. Overrides: named._Named.toStr

### transform (self, x, y, z, inverse=False) |
Transform a (geocentric) Cartesian point, forward or inverse. Arguments: `x` - X coordinate (`meter`). `y` - Y coordinate (`meter`). `z` - Z coordinate (`meter`). `inverse` - Optional direction, forward or inverse (`bool`). Returns: A Vector3Tuple`(x, y, z)`, transformed.