class PointCloud(dtcc.Geometry)[source]

Represents a set of points in 3D.

points

The points of the point cloud as (n,3) dimensional numpy array.

Type:

np.ndarray

classification

The classification of the points as (n,) dimensional numpy array.

Type:

np.ndarray

intensity

The intensity of the points as (n,) dimensional numpy array.

Type:

np.ndarray

return_number

The return number of the points as (n,) dimensional numpy array.

Type:

np.ndarray

num_returns

The number of returns of the points as (n,) dimensional numpy array.

Type:

np.ndarray

Public members

__str__()[source]

Return a string representation of the PointCloud, containing its boundaries and number of points.

__len__()[source]

Get the number of points in the PointCloud.

used_classifications() set[source]

Get the set of unique classifications used in the PointCloud.

calculate_bounds()[source]

Calculate the bounds of the point cloud and update the bounds attribute.

remove_points(indices: ndarray)[source]

Remove points from the point cloud using the given indices.

merge(other)[source]

Merge another point cloud into this point cloud.

to_proto() Geometry[source]

Return a protobuf representation of the PointCloud.

from_proto(pb: Geometry | bytes)[source]

Initialize PointCloud from a protobuf representation.

PointCloud(...)

Initialize self. See help(type(self)) for accurate signature.

__repr__()

Return repr(self).

__eq__(other)

Return self==value.

save(outfile)
remove_global_outliers(margin: float)

Remove outliers from a PointCloud whose Z-values are more than margin standard deviations from the mean.

classification_filter(classes: list[int], keep: bool = False)

Filter a PointCloud object based on its classification.

remove_vegetation() PointCloud

Return a pioint cloud with vegetation removed.

rasterize(cell_size: float, ...) Raster

Rasterize a point cloud into a Raster object.

view(size: float = 0.2, data: ndarray | None = None)

View a point cloud in 3D with a GLFW window.

points : ndarray
classification : ndarray
intensity : ndarray
return_number : ndarray
num_returns : ndarray
property bounds
add_field(field: Field)[source]

Add a field to the geometry.

transform : Transform
fields : list[Field]
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.