Generate Model
TerrainType
Bases: Enum
Categorical enumeration defining landscape complexities for ground filtering tolerances.
Source code in src/phytospatial/lidar/generate_model.py
generate_chm(source, resolution, crs, terrain=TerrainType.RELIEF, chunk_size=2000000, force_csf=False, filter_size=3)
Constructs a finalized Canopy Height Model entirely in-memory using a fused single-pass map execution, eliminating redundant disk streaming and intermediate layer serializations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Union[str, Path, PointCloud]
|
Source coordinate spatial tensor. |
required |
resolution
|
float
|
Matrix subdivision granularity. |
required |
crs
|
Union[str, CRS]
|
Defined projection system. |
required |
terrain
|
TerrainType
|
Modifies physics bounds for cloth drop. |
RELIEF
|
chunk_size
|
int
|
Stream slicing bounds for RAM safety limits. |
2000000
|
force_csf
|
bool
|
Bypass existing structural classification checks. |
False
|
filter_size
|
int
|
Matrix kernel mapping for salt-and-pepper noise dampening. |
3
|
Returns:
| Name | Type | Description |
|---|---|---|
Raster |
Raster
|
Cleaned, height-normalized canopy architecture model. |
Source code in src/phytospatial/lidar/generate_model.py
generate_dsm(source, resolution, crs, chunk_size=2000000)
Extracts and filters the maximum vegetation footprint from the unified spatial pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Union[str, Path, PointCloud]
|
Target geometric entity or byte file. |
required |
resolution
|
float
|
Square dimension of discrete matrix cells in coordinate metrics. |
required |
crs
|
Union[str, CRS]
|
Projection and datum specifications. |
required |
chunk_size
|
int
|
Execution point limit strictly scaling active RAM utilization. |
2000000
|
Returns:
| Name | Type | Description |
|---|---|---|
Raster |
Raster
|
Sealed and hole-filled contiguous surface footprint. |
Source code in src/phytospatial/lidar/generate_model.py
generate_dtm(source, resolution, crs, terrain=TerrainType.RELIEF, chunk_size=2000000, force_csf=False)
Extracts and interpolates the minimum bare earth elevation footprint from the unified spatial pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Union[str, Path, PointCloud]
|
Target geometric entity or byte file. |
required |
resolution
|
float
|
Square dimension of discrete matrix cells in coordinate metrics. |
required |
crs
|
Union[str, CRS]
|
Projection and datum specifications. |
required |
terrain
|
TerrainType
|
Modifies internal simulation tension limits for complex landscapes. |
RELIEF
|
chunk_size
|
int
|
Execution point limit strictly scaling active RAM utilization. |
2000000
|
force_csf
|
bool
|
Circumvents explicit classifications to re-simulate ground masks. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Raster |
Raster
|
Interpolated and sealed continuous surface. |