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

# Class Transform

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

Helmert transformation.

See Also: Helmert7Tuple.

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. |
__matmul__(self, other) Helmert-transform a cartesian `other`. |
inverse(self, name='') Return the inverse of this transform. |
toStr(self, prec=5, name='', **unused) 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`: `unregister` Inherited from `named._NamedBase`: `__repr__`, `__str__`, `others`, `toRepr` Inherited from `named._Named`: `__imatmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables
| tx = `0.0`
| ty = `0.0`
| tz = `0.0`
| rx = `0.0`
| ry = `0.0`
| rz = `0.0`
| s = `0.0`
| s1 = `1.0`
| sx = `0.0`
| sy = `0.0`
| sz = `0.0`

Properties
Inherited from `named._NamedEnumItem`: `name` Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `named`, `named2`, `named3`, `named4`, `sizeof` 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 (`float`), ppm. `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.

### __matmul__ (self, other) |
Helmert-transform a cartesian `other`. Raises: `TypeError` - Invalid `other`. Overrides: named._Named.__matmul__

### 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, name='', **unused) |
Return this transform as a string. Arguments: `prec` - Number of (decimal) digits, unstripped (`int`). `name` - Override name (`str`) or `None` to exclude this transform's name. Returns: Transform attributes (`str`). 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.