lidR (version 1.1.0)

lasnormalize: Subtract digital terrain model

Description

Subtract digital terrain model (DTM) from the LiDAR data to create a dataset normalized with the ground at 0. The digital terrain model can originate from several sources e.g. from an external file or computed by the user. It can also be computed on the fly.

Usage

lasnormalize(.las, dtm)

Arguments

.las

a LAS objet

dtm

a RasterLayer or a lasmetrics object. grid_terrain.

Value

A LAS object.

See Also

raster grid_terrain

Examples

Run this code
# NOT RUN {
LASfile <- system.file("extdata", "Topography.laz", package="lidR")
lidar = readLAS(LASfile)

plot(lidar)

# --- First option: compute the DTM with grid_terrain -----

dtm = grid_terrain(lidar, method = "delaunay")
lidar_norm = lasnormalize(lidar, dtm)
plot(dtm)
plot(lidar_norm)

# }
# NOT RUN {
# --- Second option: read the DTM from a file -----

dtm = raster::raster(terrain.tiff)
lidar_norm = lidar - dtm
plot(lidar_norm)
# }

Run the code above in your browser using DataLab