geo3d.rasters.blocks

Classes

PipelineBlock

Base class for all pipeline blocks.

EPTReaderBlock

EPT reader block.

LASReaderBlock

LAS reader block.

NoiseRemovalBlock

Noise removal block.

AboveGroundFilterBlock

Above ground filter block.

GdalWriterBlock

GDAL raster writer block.

Module Contents

class geo3d.rasters.blocks.PipelineBlock

Bases: abc.ABC

Base class for all pipeline blocks.

abstract build() List[altametris.geo3d.core.base.Component]

Build PDAL stages for this block.

Returns:

A list of PDAL components (readers, writers, filters).

Return type:

List[Component]

class geo3d.rasters.blocks.EPTReaderBlock(filename: str, resolution: float | None = None, bounds: str | None = None, token: str | None = None)

Bases: PipelineBlock

EPT reader block.

It reads an EPT file and optionally applies bounds to crop. It can use a token to access the file.

filename
resolution = None
bounds = None
token = None
build() List[altametris.geo3d.core.base.Component]

Build the EPT reader block.

Returns:

The EPT reader block as a list containing only the PDAL EPT reader.

Return type:

List[Component]

class geo3d.rasters.blocks.LASReaderBlock(filename: str, bounds: str | None = None)

Bases: PipelineBlock

LAS reader block.

It reads the LAS file and optionally applies bounds to crop it.

filename
bounds = None
build() List[altametris.geo3d.core.base.Component]

Build the LAS reader block.

Returns:

The LAS reader block as a list containing the PDAL LAS reader followed by the crop filter.

Return type:

List[Component]

class geo3d.rasters.blocks.NoiseRemovalBlock(mean_k: int, multiplier: float)

Bases: PipelineBlock

Noise removal block.

Noise removal is done using a statistical outlier filter. Noise points which are given the class 7 are removed from the point cloud.

mean_k
multiplier
build() List[altametris.geo3d.core.base.Component]

Build the noise removal block.

Returns:

The NoiseRemovalBlock list containing the statistical outlier and the range filters.

Return type:

List[Component]

class geo3d.rasters.blocks.AboveGroundFilterBlock(height_threshold: float)

Bases: PipelineBlock

Above ground filter block.

First, ground is detected using an SMRF filter (with default paremeters). Then, a ‘Height Above Ground Nearest Neighbor’ filter is applied to create a normalized height values in a dimension called ‘HeightAboveGround’. Last, A ranger filter is applied to remove points abouve a normalized height.

height_threshold
build() List[altametris.geo3d.core.base.Component]

Build the above ground filter block.

Returns:

The AboveGroundFilterBlock list containing the smrf, hag_nn, and range filters.

Return type:

List[Component]

class geo3d.rasters.blocks.GdalWriterBlock(filename: str, resolution: float, window_size: float | None = None)

Bases: PipelineBlock

GDAL raster writer block.

The raster is created from an input point cloud and represents a dataset of different statistics. In this block we compute the ‘min’ and ‘max’ statistics that will be used to a correct height range.

filename
resolution
window_size = None
build() List[altametris.geo3d.core.base.Component]

Build the GDAL writer block.

Returns:

The GdalWriterBlock list containing the GDAL writer.

Return type:

List[Component]