Skip to contents

Generate height raster from LiDAR data

Usage

calc_heights_from_lidar(
  las = NULL,
  res = 1,
  ground = FALSE,
  thresholds = c(0, 2, 5, 10, 20),
  filename = NULL,
  ...
)

Arguments

las

LiDAR data (a lidR::LAS-class() or lidR::LAScatalog-class() object).

res

Spatial resolution of the raster

ground

Logical. Calculate ground height in addition to canopy/roof heights?

thresholds

Set of height thresholds (see lidR::dsm_pitfree()).

filename

Character. Output filename. Note that if a file already exists with that name, it will be overwritten.

...

further arguments to lidR::pitfree()

Value

SpatRaster with height data

Examples

if (FALSE) {
heights <- calc_heights_from_lidar(PlazaNueva())
}