alsdb.processing.chm.compute_dtm#
- alsdb.processing.chm.compute_dtm(provider: TileDBProvider, store: ALSZarrStore, resolution: float = 1.0, bbox: tuple[float, float, float, float] | None = None, year: int | None = None, *, dtm_method: str = 'tin', overwrite: bool = False, tile_size: float = 500.0, tile_buffer: float = 10.0, n_workers: int = 1) None[source]#
Interpolate ground points (Class 2) to a DTM and write into store.
- Parameters:
provider – TileDB provider instance.
store –
ALSZarrStoretarget.resolution – Grid cell size in metres.
bbox – Optional spatial filter
(min_x, min_y, max_x, max_y).year – Survey year filter.
dtm_method –
Interpolation method for terrain surface estimation:
"tin"(default) — PDALfilters.delaunay+filters.faceraster. Linear interpolation within each Delaunay triangle; the gold-standard terrain model."idw"— Inverse Distance Weighting via scipy kd-tree (power=2, k=8 neighbours). Smoother than TIN; better behaved on very sparse tiles where Delaunay cannot build a mesh."min"— Minimum-Z binning. Fast but leaves NaN gaps wherever no ground return falls in a cell.
overwrite – If
False(default) and DTM data for year already exists in the store, the computation is skipped.tile_size – Sub-tile width/height in metres (default 500 m).
tile_buffer – Query buffer so ground points near tile edges are available for interpolation (default 10 m; increase for very sparse surveys).
n_workers – Parallel workers (default 1 = sequential).