View source: R/clip_lidR_ctgs.R
get_dem_csm_chm | R Documentation |
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.
get_dem_csm_chm(las, res = 0.5)
las |
LAS object from lidR package to create model |
res |
output resolution in m |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.