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.

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
#> [1] TRUE
vxsp@data[ag, on=list(i, j, k)]
#>          i     j     k ground_distance nbEchos nbSampling   lgTotal lMeanTotal
#>      <int> <int> <int>           <num>   <int>      <int>     <num>      <num>
#>   1:     0     0     0            0.25       0       3369 1100.3662  0.3266151
#>   2:     0     0     1            0.75       0       3129  904.9130  0.2892020
#>   3:     0     0     2            1.25       0       2406  751.1223  0.3121872
#>   4:     0     0     3            1.75       0       2106  659.1803  0.3130011
#>   5:     0     0     4            2.25       0       1919  602.4054  0.3139163
#>  ---                                                                          
#> 416:     6     5     5            2.75       0       1533  495.9831  0.3235376
#> 417:     6     5     6            3.25       0       1394  458.5256  0.3289280
#> 418:     6     5     7            3.75       0       1261  422.9537  0.3354113
#> 419:     6     5     8            4.25       0        823  283.2120  0.3441215
#> 420:     6     5     9            4.75       0        813  288.8458  0.3552839
#>       sdLength angleMean bsPotential bsEntering bsIntercepted transmittance
#>          <num>     <num>       <num>      <num>         <num>         <num>
#>   1: 0.1866441  68.74669  0.18236696 0.18164480             0             1
#>   2: 0.1943504  61.30513  0.17215119 0.17109131             0             1
#>   3: 0.1980757  54.47612  0.13515397 0.13368462             0             1
#>   4: 0.1985490  52.09007  0.12226181 0.12128547             0             1
#>   5: 0.1975347  51.82097  0.11477382 0.11332583             0             1
#>  ---                                                                       
#> 416: 0.1947745  51.03537  0.09570192 0.09483800             0             1
#> 417: 0.1926026  52.84722  0.08968004 0.08821365             0             1
#> 418: 0.1887876  54.56818  0.08480823 0.08081702             0             1
#> 419: 0.1861656  71.59585  0.06110164 0.05498709             0             1
#> 420: 0.1826305  72.38877  0.06070402 0.05445548             0             1
#>      PadBVTotal attenuation_FPL_biasedMLE attenuation_FPL_biasCorrection
#>           <num>                     <num>                          <num>
#>   1:          0                         0                              0
#>   2:          0                         0                              0
#>   3:          0                         0                              0
#>   4:          0                         0                              0
#>   5:          0                         0                              0
#>  ---                                                                    
#> 416:          0                         0                              0
#> 417:          0                         0                              0
#> 418:          0                         0                              0
#> 419:          0                         0                              0
#> 420:          0                         0                              0
#>      attenuation_FPL_unbiasedMLE weightedEffectiveFreepathLength
#>                            <num>                           <num>
#>   1:                           0                      0.05982848
#>   2:                           0                      0.04976479
#>   3:                           0                      0.04226232
#>   4:                           0                      0.03827859
#>   5:                           0                      0.03578283
#>  ---                                                            
#> 416:                           0                      0.03092307
#> 417:                           0                      0.02917568
#> 418:                           0                      0.02708526
#> 419:                           0                      0.01887177
#> 420:                           0                      0.01926193
#>      weightedFreepathLength attenuation_PPL_MLE distLaser
#>                       <num>               <num>     <num>
#>   1:             0.05956666                   0  3.585220
#>   2:             0.04955374                   0  3.768980
#>   3:             0.04207453                   0  3.980582
#>   4:             0.03810857                   0  4.410619
#>   5:             0.03562487                   0  4.757694
#>  ---                                                     
#> 416:             0.03078603                   0  5.328756
#> 417:             0.02904613                   0  5.649271
#> 418:             0.02696477                   0  5.863010
#> 419:             0.01878658                   0  6.421073
#> 420:             0.01917410                   0  6.466489