vox: Voxelisation of 3D point cloud recording the number of points...

Description Usage Arguments Value References Examples

View source: R/vox.R

Description

Voxelisation of 3D point cloud recording the number of points within each voxels.

Usage

1
vox(data, res, full.grid, message)

Arguments

data

a data.frame or data.table containing the x, y, z, ... coordinates of a point cloud.

res

numeric. Resolution of a voxel.

full.grid

logical. If TRUE empty voxels contained in the tree bounding box are returned. If FALSE, only filled voxels are returned. Default = FALSE.

message

logical. If FALSE, messages are disabled. Default = TRUE.

Value

A data.frame or data.table containing the x, y, z coordinates of the voxel center and the number of points within each voxel of a voxel cloud.

References

Lecigne, B., Delagrange, S., & Messier, C. (2018). Exploring trees in three dimensions: VoxR, a novel voxel-based R package dedicated to analysing the complex arrangement of tree crowns. Annals of botany, 121(4), 589-601.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#- import file
tls=data.table::fread(system.file("extdata", "Tree_t0.asc", package="VoxR"))

#- resolution = 0.02m
voxels_002 = VoxR::vox(tls,res=0.02) # voxelisation
VoxR::plot_voxels(voxels_002) # voxels plot

#- resolution = 0.2m
voxels_02 = VoxR::vox(tls,res=0.2) # voxelisation
VoxR::plot_voxels(voxels_02) # voxels plot

VoxR documentation built on Nov. 16, 2020, 9:14 a.m.

Related to vox in VoxR...