# NOT RUN {
# Get the example laz file
normlas.file = system.file("extdata", "lidar_example.laz", package="leafR")
# Calculate LAD from voxelization
# use thicker grain size to avoid voxels
# without returns
VOXELS_LAD.5 = lad.voxels(normlas.file,
grain.size = 5, k=1)
#Map using absolute values
lai_raster = lai.raster(VOXELS_LAD.5)
# }
# NOT RUN {
x11()
plot(lai_raster)
# }
# NOT RUN {
#############################
## RELATIVE LAI Raster
######################
# Calculate voxels LAD with finer grain size for
# better estimation of LAI
VOXELS_LAD = lad.voxels(normlas.file,
grain.size = 2)
# Calculate the LAD profile
lad_profile = lad.profile(VOXELS_LAD)
#Calculate LAI derived from LAD profile
lidar.lai = lai(lad_profile)
#Map using relative values (%)
relative.lai_raster = lai.raster(VOXELS_LAD.5, relative.value = lidar.lai)
# }
# NOT RUN {
x11()
plot(relative.lai_raster)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab