Skip to contents

Create a Digital Terrain Model using triangulate and rasterize.

Usage

dtm(res = 1, add_class = NULL, ofile = temptif())

Arguments

res

numeric. The resolution of the raster.

add_class

integer. By default it triangulates using ground points (class 2). It is possible to provide additional classes such as 9 for water.

ofile

character. Full outputs are always stored on disk. If ofile = "" then the stage will not store the result on disk and will return nothing. It will however hold partial output results temporarily in memory. This is useful for stage that are only intermediate stage.

Examples

f <- system.file("extdata", "Topography.las", package="lasR")
pipeline <- reader_las() + dtm()
exec(pipeline, on = f)
#> class       : SpatRaster 
#> dimensions  : 286, 286, 1  (nrow, ncol, nlyr)
#> resolution  : 1, 1  (x, y)
#> extent      : 273357, 273643, 5274357, 5274643  (xmin, xmax, ymin, ymax)
#> coord. ref. : NAD83(CSRS) / MTM zone 7 (EPSG:2949) 
#> source      : file1f7b8e0df4.tif 
#> name        : file1f7b8e0df4