API Reference#

This page provides an auto-generated summary of alsDB’s public API. For usage examples and conceptual background, refer to the alsDB User Guide guide.

Core classes#

ALSDatabase([storage_type, uri, schema_cfg, ...])

Write interface for the ALS TileDB array.

ALSProvider([storage_type, uri, url, ...])

Read interface for the ALS TileDB array.

ALSTile(path[, classification_filter, ...])

Processes a single LAZ tile into arrays ready for TileDB ingestion.

Storage#

storage.ALSZarrStore(path[, mode, ...])

Zarr-backed store for ALS gridded products.

TileDB backend#

TileDBProvider([storage_type, uri, url, ...])

Base class for managing low-level interactions with TileDB arrays for ALS data.

TileDBSchemaConfig([tile_extent_x, ...])

Schema and domain configuration for the ALS TileDB array.

create_schema(cfg)

Build a sparse TileDB array schema for LAS point-cloud data.

Tile and tile name#

Tile(path)

Wrapper around any LAZ/LAS tile file.

PNOATileName(year, region, tile_x_km, ...)

Metadata derived from a PNOA LAZ tile filename.

parse_tile_filename(filename)

Parse a PNOA LAZ filename and return a PNOATileName.

Processing#

Canopy Height Model#

processing.chm.compute_chm(provider, store)

Compute surface products on one fixed north-up grid and write to Zarr.

processing.chm.compute_dtm(provider, store)

Compute surface products on one fixed north-up grid and write to Zarr.

processing.chm.compute_dsm(provider, store)

Compute surface products on one fixed north-up grid and write to Zarr.

processing.chm.compute_all(provider, store)

Compute surface products on one fixed north-up grid and write to Zarr.

Gap fraction and LAI#

processing.gap.compute_gap_fraction(...[, ...])

Compute gap fraction (and optionally effective LAI) and write into store.

Structural metrics and biomass#

processing.biomass.compute_metrics(provider, ...)

Compute LiDAR structural metrics and write them into store.

processing.biomass.compute_biomass(provider, ...)

Estimate Above-Ground Biomass (AGB) and write into store.

processing.biomass.naesset_model(metrics[, ...])

Næsset-style power-law AGB model (Mg ha⁻¹).

processing.biomass.calibrate_naesset(h95, ...)

Fit Næsset power-law AGB coefficients (a, b, c) to field-plot data.

processing.biomass.wrap_sklearn_model(estimator)

Wrap a fitted scikit-learn estimator as a model_fn for compute_biomass.

Multi-temporal change detection#

processing.change.compute_change(store, ...)

Compute per-pixel change between two survey years for variable.

Individual tree segmentation#

processing.trees.segment_trees(provider[, ...])

Segment individual trees using filters.litree.

Waveform simulation#

processing.waveform.simulate_waveform(...[, ...])

Query a footprint and simulate it; see waveform_from_points for parameters.

processing.waveform.simulate_batch(provider, ...)

Simulate waveforms for a batch of shot locations in parallel.

Tiling utilities#

processing._tiling.tile_bboxes(bbox, ...)

Partition bbox into a grid of sub-tiles.

processing._tiling.run_tiled(worker_fn, ...)

Run worker_fn over all tiles, sequentially or in a thread pool.

processing._tiling.array_crs(provider)

Return the CRS string stored in the TileDB array metadata.

processing._tiling.array_data_bbox(provider)

Return the bounding box of actually stored data via nonempty_domain.

processing._tiling.check_year_exists(year, ...)

Return True if year falls within the ingested year range.

processing._tiling.check_bbox_overlap(...)

Return True if requested overlaps the stored data extent.

Visualisation#

2-D point-cloud plots#

utils.viz.plot_overview(df[, resolution, ...])

Four-panel overview figure: DSM with hillshade, RGB, intensity, classification.

utils.viz.plot_dsm(df[, resolution, ...])

Plot a Digital Surface Model (max Z per cell), optionally with hillshade.

utils.viz.plot_rgb(df[, resolution, ...])

Plot an RGB orthoimage from the colourised point cloud.

utils.viz.plot_intensity(df[, resolution, ...])

Plot a mean-intensity raster (greyscale).

utils.viz.plot_classification(df[, ...])

Plot a classification map with standard LAS colour coding.

utils.viz.plot_waveform(result[, ax_wave, ...])

Two-panel waveform plot for a WaveformResult.

utils.viz.plot_rh_profile(result[, ax_rh, ...])

Two-panel figure matching the GEDI L2A canonical waveform representation.

utils.viz.plot_waveforms_3d(results[, ...])

3-D waterfall plot of simulated GEDI-like waveforms.

utils.viz.plot_pointcloud_3d(df[, color_by, ...])

3-D scatter plot of the point cloud.

Gridded product plots#

utils.viz_raster.plot_chm(store[, ...])

Plot the Canopy Height Model from store.

utils.viz_raster.plot_dtm(store[, ...])

Plot the Digital Terrain Model from store, optionally with hillshade.

utils.viz_raster.plot_dsm(store[, ...])

Plot the Digital Surface Model from store, optionally with hillshade.

utils.viz_raster.plot_agb(store[, ...])

Plot Above-Ground Biomass (AGB) from store.

utils.viz_raster.plot_gap(store[, ...])

Plot gap fraction from store.

utils.viz_raster.plot_lai(store[, ...])

Plot effective LAI from store.

utils.viz_raster.plot_metrics(store[, ...])

Multi-panel overview of LiDAR structural metrics.

utils.viz_raster.plot_products(store[, ...])

Three-panel overview: DTM | DSM | CHM.

utils.viz_raster.plot_products_agb(store[, ...])

Four-panel overview: DTM | DSM | CHM | AGB.

Utilities#

utils.constants.ALSProduct(*values)

Enum representing PNOA ALS data product types.

setup_logging([level])

Configure alsdb logging.