- class Transform(dtcc_model.model.Model)[source]
Represents an affine transformation to a global coordinate system.
The affine transformation is represented by a 4x4 matrix, where the upper-left 3x3 submatrix represents the rotation and scaling, and the last column represents the translation. By applying the affine transformation to the coordinates of a point in the local coordinate system, one obtains the coordinates of the point in the global coordinate system specified by the spatial reference system (SRS).
Public members¶
-
srs : str =
''
- set_translation(dx, dy, dz)[source]
Set the translation part of the affine transform.
- set_rotation(rotation_matrix)[source]
Sets the rotation part of the affine transform. :param rotation_matrix: a 3x3 numpy array representing the rotation.
- from_proto(pb: Transform | bytes)[source]
Initialize Transform from a protobuf representation.
- Transform(srs: str = '', affine: ~numpy.ndarray = <factory>)
Initialize self. See help(type(self)) for accurate signature.
- __repr__()
Return repr(self).
- __eq__(other)
Return self==value.
- affine : ndarray
- to_json() str
Return a JSON representation of the object.
- copy(**kwargs)
Return a copy of the object.
-
classmethod add_methods(module, name=
None
) Adds methods from a module or function to the class.
-
classmethod print_methods(verbose=
False
) Print the methods that have been added to the class.
-
srs : str =