Skip to content

R-based script for processing lidar point cloud data, generating and visualizing Digital Surface Model (DSM) and Digital Terrain Model (DTM), and extracting forest canopy metrics based on the lidR package.

License

Notifications You must be signed in to change notification settings

OpenForest4D/lidar-canopy-metrics-r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

NSF-1948997 NSF-2409886 NSF-2409887

Lidar Data Processing and Canopy Metrics Extraction in R

R-based script for processing airborne lidar data, visualizing point clouds, generating surface models, extracting canopy metrics, and segmenting individual trees. The workflow leverages the lidR, terra, sf, RCSF and other packages to automate common lidar analysis tasks, including noise filtering, ground classification, normalization, canopy height modeling, and individual tree segmentation.

Features:

  • Lidar Data Import and Cleaning: Reads .laz files, removes duplicate and noisy points, and classifies ground points.
  • 3D Visualization: Visualizes lidar point clouds in 3D using custom and viridis color ramps.
  • Surface Model Generation: Creates Digital Surface Model (DSM), Digital Terrain Model (DTM), and Canopy Height Model (CHM).
  • Height Normalization: Normalizes point heights relative to the ground surface.
  • Canopy Metrics Calculation: Computes grid-based canopy structure metrics, including percentiles, mean, max, and cover.
  • CHM Smoothing and Tree Detection: Applies median filtering to CHM, detects tree tops, and segments individual trees.
  • Crown Delineation and Metrics: Delineates tree crowns and computes crown-level statistics.

Inputs:

  • laspath: Path to the lidar point cloud laz file.
  • res: Resolution for raster products (default: 1m).
  • algorithm: Rasterization algorithm (default: "p2r").

Outputs:

  • Raster files for DSM, DTM, CHM, and smoothed CHM (.tif)
  • Normalized lidar data (.laz)
  • Canopy metrics grid and tree crown polygons

Requirements

R packages: lidR, terra, sf, RCSF, rgl, viridis, pacman

About

R-based script for processing lidar point cloud data, generating and visualizing Digital Surface Model (DSM) and Digital Terrain Model (DTM), and extracting forest canopy metrics based on the lidR package.

Topics

Resources

License

Stars

Watchers

Forks

Languages