Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 17:07
· 14 commits to main since this release

First release of vgi-lidar, a Python VGI worker that analyses bounded local classified LAS/LAZ point clouds from SQL. It returns building/canopy heights and conductor vegetation-clearance results as rows you can join to your own tables.

Functions (schema main)

  • height_metrics((SELECT feature_id, geometry_wkb FROM areas), path := ..., geometry_crs := ...): per-polygon building/canopy height percentiles, point counts, ground-support status and sampled canopy cover (with observed_cell_fraction / ground_supported_cell_fraction).
  • vegetation_clearance((SELECT feature_id, geometry_wkb FROM conductors), clearance_m := ...): vegetation returns within a 3D distance of conductor segments.
  • demo_input() / demo_input(kind := 'conductor'): bundled polygon and 3D conductor fixtures.

Composed examples

The README and the metadata examples combine both analyses per span: canopy over the right-of-way polygon from height_metrics, joined to encroaching returns along the conductor from vegetation_clearance. On the bundled data this gives Span 7 | 18.0 | 0.077 | 1 | 2 | 2.0. A corridor agent-test task covers the same pattern.

Quick start

git clone https://github.com/Query-farm/vgi-lidar.git
cd vgi-lidar
git checkout v0.1.0
uv sync --locked
make demo
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
  WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL spatial;
LOAD spatial;
ATTACH 'lidar' (TYPE vgi,
  LOCATION 'uv run --locked vgi-lidar-worker');

Signed wheel and sdist (cosign bundles plus build provenance) are attached. Nothing is published to PyPI.

Known limits

  • Loads bounded local LAS/LAZ tiles (default cap 2 million points). It does not stream remote COPC.
  • Uses existing classifications (ground 2, vegetation 3/4/5, building 6; noise 7/18 and withheld returns are excluded). It does not classify unlabelled clouds or extract conductor geometry.
  • Needs projected metre coordinates. Conductors must already be in absolute metre elevations in the same vertical datum, because XY reprojection does not transform vertical datums.
  • Heights from nearest-ground estimates are approximate on steep or complex terrain. Unsupported heights come back as NULL and are counted.
  • Canopy cover is sampled over observed, ground-supported grid cells (default 5 m cells, 100,000-cell cap). It is not wall-to-wall canopy area.
  • A zero clearance count means no sampled returns met the threshold. It does not certify a corridor as safe.