raster2Cimg {lidaRtRee}R Documentation

SpatRaster to Cimg conversion

Description

converts a SpatRaster object to cimg object. NA values in raster are replaced.

Usage

raster2Cimg(r, NA_replace = 0, maxpixels = 1e+10)

Arguments

r

SpatRaster object. raster of canopy height model, preferably filtered to avoid effect of holes on volume and surface computation

NA_replace

numeric. value to replace NA values with.

maxpixels

numeric. maximum number of pixels to be converted to cimg (argument passed to as.cimg).

Value

A cimg object

See Also

cimg2Raster

Examples

data(chm_chablais3)
chm_chablais3 <- terra::rast(chm_chablais3)

chm_cim <- raster2Cimg(chm_chablais3)
chm_cim
summary(chm_cim)

# plot SpatRaster
terra::plot(chm_chablais3)

# plot cimg object
plot(chm_cim)

[Package lidaRtRee version 4.0.5 Index]