project_voxels: Project a voxel cloud in a 2D plan formed by two axes of the...

Description Usage Arguments Value References Examples

View source: R/project_voxels.R

Description

Project a voxel cloud in a 2D plan formed by two axes of the cartesian coordiantes system.

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#- 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

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