alsdb.processing.chm.compute_chm#

alsdb.processing.chm.compute_chm(provider: TileDBProvider, store: ALSZarrStore, resolution: float = 1.0, bbox: tuple[float, float, float, float] | None = None, year: int | None = None, *, first_returns_only: bool = True, height_statistic: str = 'max', pit_fill: bool = True, overwrite: bool = False, tile_size: float = 500.0, tile_buffer: float = 50.0, n_workers: int = 1) None[source]#

Compute a Canopy Height Model and write it into store.

Parameters:
  • provider – TileDB provider instance.

  • storeALSZarrStore target.

  • resolution – Grid cell size in metres (default 1 m).

  • bbox – Optional spatial filter (min_x, min_y, max_x, max_y).

  • year – Survey year filter. Written as a time slice in the store.

  • first_returns_only – If True (default), only first returns are used to build the canopy surface. First returns represent the first surface the laser pulse hit — i.e. the top of the canopy — which is the physically correct input for a CHM. Set to False to include all vegetation returns (reproduces the legacy behaviour).

  • overwrite – If False (default) and CHM data for year already exists in the store, the computation is skipped entirely. Set to True to force recomputation.

  • tile_size – Sub-tile width/height in metres (default 500 m).

  • tile_buffer – Overlap buffer for filters.hag_delaunay accuracy (default 50 m).

  • n_workers – Parallel workers (default 1 = sequential).