Tools to process airborne and satellite LiDAR point clouds.
Warning! This package is under active development and may change rapidly!
- 3DEP AWS Public Dataset
- Locally available, classified LiDAR point clouds in las/laz format
- Digital Surface Models: IDW interpolation based gridding of height values for
firstandonlyreturns. - Digital Terrain Models: IDW interpolation based gridding of height values for
groundreturns (Classification==2). We do not perform ground classification ourselves, input point clouds need to have ground returns labelled for terrain models generation. An additional gap-filled product using IDW interpolation with a 9 x 9 kernel can also be produced which is useful in reducing data gaps in areas with dense canopy or buildings. - Surface Intensity: IDW interpolation based gridding of surface intensity values for
firstandonlyreturns.
Sample of standard products created with lidar_tools
rasterize utility for University of Washington Campus AOI, using publicly-available USGS 3DEP lidar point clouds (WA_KingCounty_2021_B21)
lidar_tools is a collection of CLI scripts to process LiDAR data. It should be installed into a stand-alone environment to ensure that scripts execute as intended. We recommend using pixi to install a locked software environment.
We recommend using pixi package manager to install a locked software environment for executing code in this repository.
Pixi can be installed following instructions from here. For Linux and Mac OSX machines, pixi can be installed from the terminal by running the below command:
curl -fsSL https://pixi.sh/install.sh | sh
git clone https://github.com/uw-cryo/lidar_tools.git
cd lidar_tools
pixi install --frozenRun our example workflow to create DSM, DTM without interpolation, DTM with interpolation, and LiDAR Intensity for 3DEP data over a part of University of Washington Campus in Seattle, WA!
# NOTE: takes ~5 min to run
pixi run example
Once installed, you can run processing scripts from a terminal:
export PIXI_FROZEN=true # NOTE: set this to always use locked environment
pixi shell # NOTE: 'exit' deactivates the environment
lidar-tools --help # all commands
lidar-tools rasterize --help # options for one command| Command | What it does |
|---|---|
search |
Search the lidar catalog: which collections cover an AOI, at what quality level and acquisition dates, with what declared CRS/datum/geoid, EPT availability, AOI overlap, and the uncovered fraction. |
prepare |
Stage discovery metadata for an AOI into site_manifest.yaml: pinned WESM records, EPT name resolution, TESM-vs-links tile reconciliation, staged-LAZ cache layout. |
rasterize |
Create DSM, DTM (with and without gap filling) and/or intensity rasters from 3DEP EPT or local LAS/LAZ. |
rasterize-projects |
Run rasterize once per survey into per-project subdirectories sharing one target grid, so the outputs are co-registered. |
merge |
Merge a batch's per-project products into per-product VRT composites (priority order, no resampling), normalizing intensity to a common range. |
preview |
Write a one-page preview figure (shaded relief, scale bar, processing footer) for a run or for every project in a batch. |
fetch-reports |
Stage each project's vendor QA/QC, survey and mapping reports plus the USGS vertical-accuracy checkpoints next to its products. |
report-metrics |
Extract standardized metrics (acquisition period, tested vertical/horizontal accuracy, point density) from those reports into one record per project, with per-number source evidence. |
For an AOI covered by more than one 3DEP survey, the commands chain:
lidar-tools search aoi.geojson # what covers this AOI?
lidar-tools prepare aoi.geojson batch/ # pin the metadata once
lidar-tools rasterize-projects aoi.geojson \
AZ_PimaCo_1_2021,AZ_PimaCo_2_2021 \
batch/ --resolution 1 # co-registered per-project products
lidar-tools merge batch/ # per-product composites
lidar-tools preview batch/ # QA figures
lidar-tools fetch-reports batch/ # vendor reports
lidar-tools report-metrics batch/ # standardized accuracy tableProjects are listed in priority order: the first one wins where they overlap.
See docs/vendor_reports.md
for the report staging and metric extraction details (repo-only: docs/ is not
shipped in the built package).
Use a developement environment (including pytest, ruff, mypy etc)
export PIXI_FROZEN=true # Disable this if you're changing dependency versions
pixi shell -e dev
Or run the test sweet
pixi run test
Run linting and formatting
pixi run lint
pixi run typecheck
To create a conda package that can be installed into any conda environment:
pixi build
This will output a .conda file named something like lidar_tools-0.1.0-pyhbf21a9e_0.conda
To actually install the package it needs to put in a conda "registry" or "channel" like conda-forge. For now we are using a public channel at https://prefix.dev/channels for development:
conda install -c https://repo.prefix.dev/uw-cryo lidar_tools