points2DTM {lidaRtRee} | R Documentation |
Digital Terrain Model
Description
Creates a Digital Terrain Model from LAS object or XYZ data. Raster extent is
specified by the coordinates of lower left and upper right corners. Default
extent covers the full range of points, and aligns on multiple values of the
resolution. Cell value is compute as the bilinear interpolation at the cell
center form an Delaunay triangulation. Relies on rasterize_terrain
with algorithm tin
. In case a LAS object is provided, only
points classified as ground or water (2 or 9) will be used.
Usage
points2DTM(.las, res = 1, xmin, xmax, ymin, ymax)
Arguments
.las |
|
res |
numeric. raster resolution |
xmin |
numeric. lower left corner easting coordinate for output raster. |
xmax |
numeric. upper right corner easting coordinate for output raster. |
ymin |
numeric. lower left corner northing coordinate for output raster. |
ymax |
numeric. upper right corner northing coordinate for output raster. |
Value
A SpatRaster object
See Also
points2DSM
for Digital Surface Model computation.
Examples
# load LAS file
LASfile <- system.file("extdata", "las_chablais3.laz", package="lidaRtRee")
las_chablais3 <- lidR::readLAS(LASfile)
# set projection
lidR::projection(las_chablais3) <- 2154
# create digital terrain model with points classified as ground
dtm <- points2DTM(las_chablais3)
# display raster
terra::plot(dtm)