get_dem_csm_chm: Create elevation products from a LAS tile

View source: R/clip_lidR_ctgs.R

get_dem_csm_chmR Documentation

Create elevation products from a LAS tile

Description

This function takes a LAS object and returns a digital elevation model (dem), a canopy surface model (csm), and a canopy height model (chm) using default algorithms in lidR. Can be used with lidR::catalog_map. Returns a 3-lasyered SpatRast object with names dem, csm, chm.

Usage

get_dem_csm_chm(las, res = 0.5)

Arguments

las

LAS object from lidR package to create model

res

output resolution in m

Examples

library(terra)
library(lidR)
las = readLAS('E:/mylas.laz')
elev = get_cdem_csm_chm(las)
plot(elev$dem)
plot(elev$csm)
plot(elev$chm)

ctg = readLASCatalog('E:/my/las/dir/')
elev = catalog_map(ctg, get_dem_csm_chm)
plot(elev$dem)
plot(elev$csm)
plot(elev$chm)


jbcannon/landecoutils documentation built on July 16, 2025, 10:17 p.m.