pchandler.filters.gpu

GPU-accelerated filters backed by cudf and cuspatial.

Functions

ensure_available()

Raise ImportError if GPU support is not available.

is_available()

Check whether GPU support (cudf + cuspatial + geopandas) is importable.

Classes

PolygonFilterGPU

GPU-accelerated polygon filter projected on a specified plane.

SphericalPolygonFilterGPU

GPU-accelerated polygon filter defined in spherical-angle coordinates.

class pchandler.filters.gpu.PolygonFilterGPU

Bases: PointCloudFilter

GPU-accelerated polygon filter projected on a specified plane.

__init__(polygon, plane='xy')

Filter points based on a polygon projected on a specified plane (GPU backend).

Parameters:
  • polygon (ValidatedPolygonT) – Polygon defining the filter region.

  • plane (PlaneStrings, default="xy") – Plane on which the polygon is projected.

mask(pcd)

Create a boolean mask from the points inside the projected polygon.

Parameters:

pcd (PointCloudData)

Return type:

Vector_Bool_T

class pchandler.filters.gpu.SphericalPolygonFilterGPU

Bases: PointCloudFilter

GPU-accelerated polygon filter defined in spherical-angle coordinates.

__init__(polygon)

Filter points based on a polygon defined in spherical-angle coordinates (GPU backend).

Parameters:

polygon (ValidatedPolygonT) – Polygon defining the filter region in (horizontal, vertical) spherical-angle coordinates.

mask(pcd)

Create a mask of points inside the spherical-angle polygon.

Parameters:

pcd (PointCloudData) – The input point cloud data containing points to be processed.

Returns:

Boolean mask, True for points inside the polygon.

Return type:

Vector_Bool_T