Applies a 4x4 transformation matrix to a LAS point cloud. The function can handle both LAS objects and LAS file paths, transforming the point cloud data accordingly.

transform_las(las, M, crs = NULL)

Arguments

las

A LAS object or a character string representing the file path to a LAS file.

M

A 4x4 transformation matrix.

crs

Optional CRS to assign to the transformed LAS. Can be the epsg code, the wkt string or a sf crs object.

Value

A transformed LAS object. If a file path is provided for las, a new LAS file is created and returned.