ground: Extract ground from voxel space.

View source: R/Ground.R

groundR Documentation

Extract ground from voxel space.

Description

Extract ground layer from VoxelSpace object.

Ground layer

The ground layer is the set of voxels that are just above ground level. The bottom facet of the voxel must be above ground ground_distance(voxel_center) >= dz/2 with dz the voxel size on z axis. Ground layer may be missing (the function returns an empty data.table) or incomplete (the function returns a data.table with nrow(ground(vxsp)) < prod(dim(vxsp)[1:2])) for some voxel space.

Above/below ground

Function aboveGround returns voxel index above ground layer (included). Function belowGround returns voxel index below ground layer (excluded).

Ground energy

Function groundEnergy estimates fraction of light reaching the ground. It is computed as the ratio of entering beam section on potential beam section (beams that would have crossed a voxel if there were no vegetation in the scene). It requires variables bsEntering and bsPotential.

Ground elevation

Function groundElevation returns the elevation of the ground layer. It is provided as a check function, to make sure that AMAPVox digital elevation model is consistent with the one provided in input.

Usage

ground(vxsp)

belowGround(vxsp)

aboveGround(vxsp)

groundEnergy(vxsp)

groundElevation(vxsp)

Arguments

vxsp

a VoxelSpace object.

Value

data.table::data.table object with voxel index either below ground, ground level or above ground.

Examples

vxsp <- readVoxelSpace(system.file("extdata", "tls_sample.vox", package = "AMAPVox"))
gr <- ground(vxsp)
ag <- aboveGround(vxsp)
bg <- belowGround(vxsp) # empty in test case
# ground layer included in above ground subset
all(ag[gr, on=list(i, j, k)] == gr) # TRUE expected
vxsp@data[ag, on=list(i, j, k)]


AMAPVox documentation built on July 9, 2023, 5:32 p.m.