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#

alsdb.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#

alsdb.processing.chm.compute_chm(provider, store)

Compute a Canopy Height Model and write it into store.

alsdb.processing.chm.compute_dtm(provider, store)

Interpolate ground points (Class 2) to a DTM and write into store.

alsdb.processing.chm.compute_dsm(provider, store)

Rasterize maximum return elevation to a DSM and write into store.

alsdb.processing.chm.compute_all(provider, store)

Compute DTM, DSM, and CHM in one call, writing all into store.

Gap fraction and LAI#

alsdb.processing.gap.compute_gap_fraction(...)

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

Structural metrics and biomass#

alsdb.processing.biomass.compute_metrics(...)

Compute LiDAR structural metrics and write them into store.

alsdb.processing.biomass.compute_biomass(...)

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

alsdb.processing.biomass.naesset_model(metrics)

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

alsdb.processing.biomass.calibrate_naesset(...)

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

alsdb.processing.biomass.wrap_sklearn_model(...)

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

Multi-temporal change detection#

alsdb.processing.change.compute_change(...)

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

Individual tree segmentation#

alsdb.processing.trees.segment_trees(provider)

Segment individual trees using filters.litree.

Waveform simulation#

alsdb.processing.waveform.simulate_waveform(...)

Simulate a GEDI large-footprint waveform at a given UTM location.

alsdb.processing.waveform.simulate_batch(...)

Simulate waveforms for a batch of shot locations in parallel.

Tiling utilities#

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

Partition bbox into a grid of sub-tiles.

alsdb.processing._tiling.run_tiled(...)

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

alsdb.processing._tiling.array_crs(provider)

Return the CRS string stored in the TileDB array metadata.

alsdb.processing._tiling.array_data_bbox(...)

Return the bounding box of actually stored data via nonempty_domain.

alsdb.processing._tiling.check_year_exists(...)

Return True if year falls within the ingested year range.

alsdb.processing._tiling.check_bbox_overlap(...)

Return True if requested overlaps the stored data extent.

Visualisation#

2-D point-cloud plots#

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

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

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

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

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

Plot an RGB orthoimage from the colourised point cloud.

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

Plot a mean-intensity raster (greyscale).

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

Plot a classification map with standard LAS colour coding.

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

Two-panel waveform plot for a WaveformResult.

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

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

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

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

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

3-D scatter plot of the point cloud.

Gridded product plots#

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

Plot the Canopy Height Model from store.

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

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

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

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

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

Plot Above-Ground Biomass (AGB) from store.

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

Plot gap fraction from store.

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

Plot effective LAI from store.

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

Multi-panel overview of LiDAR structural metrics.

alsdb.utils.viz_raster.plot_products(store)

Three-panel overview: DTM | DSM | CHM.

alsdb.utils.viz_raster.plot_products_agb(store)

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

Utilities#

alsdb.utils.constants.ALSProduct(*values)

Enum representing PNOA ALS data product types.

alsdb.setup_logging([level])

Configure alsdb logging.