geo3d.geometry.point_cloud ========================== .. py:module:: geo3d.geometry.point_cloud Classes ------- .. autoapisummary:: geo3d.geometry.point_cloud.PointCloud Module Contents --------------- .. py:class:: PointCloud(data: numpy.typing.NDArray[numpy.floating]) Class for handling point cloud objects. .. py:attribute:: agg_funcs .. py:attribute:: required_fields :value: ('X', 'Y', 'Z', 'Classification') .. py:attribute:: data .. py:property:: xyz :type: numpy.typing.NDArray[numpy.floating] Return the xyz array. :returns: An array of shape (n, 3) :rtype: np.ndarray .. py:property:: labels :type: numpy.typing.NDArray[numpy.integer] Return the Classification array. :returns: An array of shape (n, ) :rtype: np.ndarray .. py:property:: size :type: int Return the size of the array. .. py:method:: read(filename: str) -> PointCloud :classmethod: Read a point cloud from a file. :param filename: The point cloud file. :type filename: str :returns: A PointCloud Instance. .. py:method:: write(filename: str) -> None Write a point cloud to a file. :param filename: The point cloud file. :type filename: str .. py:method:: apply(transforms: list, inplace: bool = False) -> Optional[PointCloud] Apply geometric transformations on the point cloud. :param transforms: A list of transformations. :type transforms: list :param inplace: Make changes on the current instance. Defaults to False. :type inplace: bool, optional :returns: A new PointCloud object or None. .. py:method:: merge(other: PointCloud, inplace: bool = False, max_size: int = PDAL_MAX_POINTS) -> Optional[PointCloud] Merge point clouds. :param other: A PointCloud object. :type other: PointCloud :param inplace: Make changes on the current instance or create a new one. Defaults to False. :type inplace: bool :param max_size: A maximum point size to handle in memomry. :type max_size: int :returns: A new PointCloud object or None. .. py:method:: copy() -> PointCloud Make a copy of the PointCloud object. :returns: A new PointCloud instance with copied data. :rtype: PointCloud .. py:method:: 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. :param size: The size of the voxel. :type size: int :param channels: The list of channels to compute. list the keys. :type channels: List[Dict] :returns: The grid object. :rtype: VoxelGrid2D