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

Class Transform

 object --+        
          |        
 bases.Base --+    
              |    
 object --+   |    
          |   |    
bases.Named --+    
              |    
         _Based --+
                  |
                 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=4)
Return this transform as a string.
 
transform(self, x, y, z, inverse=False)
Transform a (geocentric) Cartesian point, forward or inverse.

Inherited from _Based: __ne__

Inherited from bases.Base: __repr__, __str__, classname, classof, others, toStr2

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 bases.Named: name

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.

Parameters:
  • name - Optional, unique name (string).
  • tx - X translation (meter).
  • ty - Y translation (meter).
  • tz - Z translation (meter).
  • s - Scale ppm (float).
  • sx - X rotation (degree seconds).
  • sy - Y rotation (degree seconds).
  • sz - Z rotation (degree seconds).
Raises:
  • NameError - If transform name already exists.
Overrides: object.__init__

__eq__(self, other)
(Equality operator)

 

Compare this and an other transform.

Parameters:
Returns:
True if equal (bool).

inverse(self, name='')

 

Return the inverse of this transform.

Parameters:
  • name - Optional, unique name (string).
Returns:
Inverse (Transform).
Raises:
  • NameError - If transform name already exists.

toStr(self, prec=4)

 

Return this transform as a string.

Parameters:
  • prec - Number of decimals, unstripped (int).
Returns:
Transform attributes (string).
Overrides: bases.Base.toStr

transform(self, x, y, z, inverse=False)

 

Transform a (geocentric) Cartesian point, forward or inverse.

Parameters:
  • x - X coordinate (meter).
  • y - Y coordinate (meter).
  • z - Z coordinate (meter).
  • inverse - Direction, forward or inverse (bool).
Returns:
3-Tuple (x, y, z) transformed.