alsdb.processing.biomass.compute_biomass#
- alsdb.processing.biomass.compute_biomass(provider: TileDBProvider, store: ALSZarrStore, resolution: float = 10.0, model_fn: Callable[[dict[str, np.ndarray]], np.ndarray] | None = None, bbox: tuple[float, float, float, float] | None = None, year: int | None = None, cc_threshold: float = 2.0, *, baba_radius: float = 0.0, overwrite: bool = False, tile_size: float = 500.0, tile_buffer: float = 50.0, n_workers: int = 1, min_density: float = 0.0) None[source]#
Estimate Above-Ground Biomass (AGB) and write into store.
- Parameters:
provider – TileDB provider instance.
store –
ALSZarrStoretarget.resolution – Grid cell size in metres.
model_fn – Callable
model_fn(metrics) → np.ndarraymapping the metric dict to an AGB grid (Mg ha⁻¹). Defaults tonaesset_model.bbox – Optional spatial filter
(min_x, min_y, max_x, max_y).year – Survey year filter.
cc_threshold – HAG threshold (m) for the canopy cover metric.
min_density – Minimum total point density (pts m⁻²) required before AGB is estimated for a cell. See
compute_metricsfor guidance.overwrite – If
False(default) and biomass data for year already exists in the store, the computation is skipped.tile_size – Sub-tile width and height in metres (default 500 m).
tile_buffer – Overlap buffer for
filters.hag_delaunayaccuracy (default 50 m).n_workers – Parallel workers (default 1 = sequential).