points2DSM {lidaRtRee} | R Documentation |
Digital Surface Model
Description
Creates a Digital Surface Model from a LAS object. From version 4.0.0 relies on rasterize_canopy
.
Maintained for backward compatibility but a direct call to this function
should be preferred. 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 the maximum height of points contained in the cell.
Usage
points2DSM(.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
points2DTM
for Digital Terrain 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 a digital surface model with first-return points, resolution 0.5 m
dsm <- points2DSM(lidR::filter_first(las_chablais3), res = 0.5)
# display raster
terra::plot(dsm)