geo3d.geometry.point_cloud¶
Classes¶
Class for handling point cloud objects. |
Module Contents¶
- class geo3d.geometry.point_cloud.PointCloud(data: numpy.typing.NDArray[numpy.floating])¶
Class for handling point cloud objects.
- agg_funcs¶
- required_fields = ('X', 'Y', 'Z', 'Classification')¶
- data¶
- property xyz: numpy.typing.NDArray[numpy.floating]¶
Return the xyz array.
- Returns:
An array of shape (n, 3)
- Return type:
np.ndarray
- property labels: numpy.typing.NDArray[numpy.integer]¶
Return the Classification array.
- Returns:
An array of shape (n, )
- Return type:
np.ndarray
- property size: int¶
Return the size of the array.
- classmethod read(filename: str) PointCloud¶
Read a point cloud from a file.
- Parameters:
filename (str) – The point cloud file.
- Returns:
A PointCloud Instance.
- write(filename: str) None¶
Write a point cloud to a file.
- Parameters:
filename (str) – The point cloud file.
- apply(transforms: list, inplace: bool = False) PointCloud | None¶
Apply geometric transformations on the point cloud.
- Parameters:
transforms (list) – A list of transformations.
inplace (bool, optional) – Make changes on the current instance. Defaults to False.
- Returns:
A new PointCloud object or None.
- merge(other: PointCloud, inplace: bool = False, max_size: int = PDAL_MAX_POINTS) PointCloud | None¶
Merge point clouds.
- Parameters:
other (PointCloud) – A PointCloud object.
inplace (bool) – Make changes on the current instance or create a new one. Defaults to False.
max_size (int) – A maximum point size to handle in memomry.
- Returns:
A new PointCloud object or None.
- copy() PointCloud¶
Make a copy of the PointCloud object.
- Returns:
A new PointCloud instance with copied data.
- Return type:
- voxelize(size: int, channels: List[Dict]) altametris.geo3d.geometry.voxel.VoxelGrid2D¶
Create a 2D voxels grid from the raw point cloud by merging all the points.
- Parameters:
size (int) – The size of the voxel.
channels (List[Dict]) – The list of channels to compute. list the keys.
- Returns:
The grid object.
- Return type: