See #4832. Use shape.transformation.matrix in v0.8.0

This commit is contained in:
Dion Moult
2024-06-08 14:50:02 +10:00
parent cd2e33721e
commit 03b277626f
@@ -158,8 +158,7 @@ def get_shape_matrix(shape) -> MatrixType:
:return: A 4x4 numpy array representing the transformation matrix
:rtype: MatrixType
"""
m = shape.transformation.matrix.data
return np.array(([m[0], m[3], m[6], m[9]], [m[1], m[4], m[7], m[10]], [m[2], m[5], m[8], m[11]], [0, 0, 0, 1]))
return np.array(shape.transformation.matrix).reshape((4, 4), order="F")
def get_bbox_centroid(geometry) -> tuple[float, float, float]: