alsdb.processing.biomass.compute_metrics#

alsdb.processing.biomass.compute_metrics(provider: TileDBProvider, store: ALSZarrStore, resolution: float = 10.0, bbox: tuple[float, float, float, float] | None = None, year: int | None = None, cc_threshold: float = 2.0, *, baba_radius: float = 0.0, min_density: float = 0.0, overwrite: bool = False, tile_size: float = 500.0, tile_buffer: float = 50.0, n_workers: int = 1) None[source]#

Compute LiDAR structural metrics and write them into store.

Metrics written: h50, h75, h95, hmax, hmean, cc, density, fhd, vci, crr, pv_0_2, pv_2_5, pv_5_10, pv_10_20, pv_20_40, pv_above40 — each as a separate variable at resolution.

Parameters:
  • provider – TileDB provider instance.

  • storeALSZarrStore target.

  • resolution – Grid cell size in metres (10–25 m typical for biomass).

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

  • year – Survey year filter.

  • cc_threshold – HAG threshold (m) used to define “canopy” for the cover metric.

  • min_density – Minimum total point density (pts m⁻²) for a cell to receive metric values. Cells below this threshold are set to np.nan for all metrics. Typical values: 0.5 (sparse survey), 1.0 (moderate), 4.0 (dense modern ALS). Default 0.0 disables the guard.

  • tile_size – Sub-tile width and 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).