project_voxels {VoxR} | R Documentation |
Project a voxel cloud in a 2D plan formed by two axes of the cartesian coordiantes system.
Description
Project a voxel cloud in a 2D plan formed by two axes of the cartesian coordiantes system.
Usage
project_voxels(data, plan, message)
Arguments
data |
a data.frame or data.table containing the x, y, z, ... coordinates of a voxel cloud. |
plan |
character. Defines the projection plan: "xy", "xz" or "yz". Default = "xy". |
message |
logical. If FALSE, messages are disabled. Default = TRUE. |
Value
A data frame of a 2D point cloud containing : x, y coordinates of the pixels and the number of voxels (nvox), number of points (npts), ratio npts/nvox contained in each pixel.
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
#- import tls data
tls=data.table::fread(system.file("extdata", "Tree_t0.asc", package="VoxR"))
#- voxelisation
voxels = VoxR::vox(tls,0.05)
#- project into the xy plan
project_xy = VoxR::project_voxels(voxels,"xy")
VoxR::plot_projection(project_xy) # plot projection
#- project into the xz plan
project_xy = VoxR::project_voxels(voxels,"xz")
VoxR::plot_projection(project_xy) # plot projection
[Package VoxR version 1.0.0 Index]