| points2DTM | R Documentation | 
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.
points2DTM(.las, res = 1, xmin, xmax, ymin, ymax)
| .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. | 
A SpatRaster object
points2DSM for Digital Surface Model computation.
# load LAS file
LASfile <- system.file("extdata", "las_chablais3.laz", package="lidaRtRee")
las_chablais3 <- lidR::readLAS(LASfile)
# set number of threads
lidR::set_lidr_threads(2)
# create digital terrain model with points classified as ground
dtm <- points2DTM(las_chablais3)
# display raster
terra::plot(dtm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.