toRaster {AMAPVox} | R Documentation |
Voxel layer to raster
Description
Converts a voxel space (i, j) layer into a
terra::SpatRaster
object.
Usage
toRaster(vxsp, vx)
Arguments
vxsp |
a |
vx |
a voxel space horizontal slice. A data.table with |
Value
a terra::SpatRaster
object.
Examples
## Not run:
vxsp <- readVoxelSpace(system.file("extdata", "tls_sample.vox", package = "AMAPVox"))
library(terra)
# CHM, DEM and PAI as raster
plot(toRaster(vxsp, merge(canopyHeight(vxsp), groundElevation(vxsp), all = T)))
# PAI
vxsp <- plantAreaDensity(vxsp)
pai <- plantAreaIndex(vxsp, type = "xy", pattern.pad = "pad_transmittance")
plot(toRaster(vxsp, pai))
# sampling intensity at 2 meters
plot(toRaster(vxsp, vxsp@data[ground_distance == 2.25, .(i, j, nbSampling)]))
## End(Not run)
[Package AMAPVox version 2.2.1 Index]