geo3d.utils.geometry¶
Classes¶
Class for a 2D bounding boxes. |
Functions¶
|
Create a boundaries argument to be fed to the pdal cropper filter. |
|
Extract the xyz dimensions from a structured pdal array. |
Module Contents¶
- geo3d.utils.geometry.create_boundaries(box_dict: dict, stride: tuple = (7, 7, 1)) str¶
Create a boundaries argument to be fed to the pdal cropper filter.
- Parameters:
box_dict – A dictionary containing an object’s boundary’s box with min and max of the coordinates.
stride – A tuple of strides for the 3D boundary box
- Returns:
‘([minx, maxx], [miny, maxy], [minz, maxz])’
- Return type:
A boundary box in a string object in the forme
- geo3d.utils.geometry.extract_xyz(array: numpy.typing.NDArray[numpy.floating], shift: bool = True) numpy.typing.NDArray[numpy.floating]¶
Extract the xyz dimensions from a structured pdal array.
- Parameters:
array – The point cloud data as a structured array with dimensions as fields.
shift – Shift coordinates.
- Returns:
An array of shape (n, 3).
- class geo3d.utils.geometry.BoundingBox2D(xmin: float, ymin: float, width: float, height: float)¶
Class for a 2D bounding boxes.
- xmin¶
- ymin¶
- xmax¶
- ymax¶
- width¶
- height¶
- to_boundaries() str¶
Create a boundaries object to be used in PDAL stages.
- Returns:
The boundaries string.
- Return type:
str
- classmethod from_center_point(center: Tuple[float, float], size: float) BoundingBox2D¶
Create a squared BoundingBox from a center point and a size of the box.
- Parameters:
center (Tuple[float, float]) – The coordinates of the center point.
size (float) – The edge size of the squared bounding box.
- Returns:
The created instance.
- Return type:
BoundingBox