A rasterStack object is created, representing the 3–D voxel cube. The z axis is sliced into regular sections between the maximum and minimum value. For every height slice a raster with points per cell counts is created. Additionally the voxels can be standartized between 0 and 1.

voxelCount(
  points,
  extent,
  xyRes,
  zRes = xyRes,
  zMin,
  zMax,
  standartize = FALSE,
  verbose = FALSE
)

Arguments

points

a x, y, z data.frame

extent

a raster extent object of the extent to create the rasters

xyRes

resolution in the ground plane of the created rasters

zRes

resolution in the z axis (by default zRes = xyRes)

zMin

minimum z value

zMax

maximum height value

standartize

logical: standartize the values?

verbose

logical: print currently processed height band in raster stack?

Value

A rasterStack object, representing the 3–D voxel cube.

Examples

voxelCount(niclas, raster::extent(dem), 100, 100, 1000, 1400, standartize = TRUE)
#> class      : RasterStack 
#> dimensions : 649, 1259, 817091, 4  (nrow, ncol, ncell, nlayers)
#> resolution : 100, 100  (x, y)
#> extent     : 2543252, 2669152, 1177098, 1241998  (xmin, xmax, ymin, ymax)
#> crs        : NA 
#> names      : m1000.1100, m1100.1200, m1200.1300, m1300.1400 
#> min values :          0,          0,          0,          0 
#> max values :          1,          1,          1,          1 
#>