get_density()
calculates the approximate average point and pulse (first/last-return only) density of LAS files.
Details
For this function only the header from LAS files is read and density is calculated based on the bounding box of the data file and the number of points of first-returns. This does not take into account if parts of the bounding box are missing data, and hence this density does not reflect the density as it is calculates by e.g. lidR
. However, it is much faster because it does not read the entire file and density should be approximately the same if the entire bounding box has point data.
Examples
f <- system.file("extdata", package = "managelidar")
get_density(f)
#> filename npoints npulses area
#> 1 3dm_32_547_5724_1_ni_20240327.laz 2936 2606 309656.1 [m^2]
#> 2 3dm_32_547_5725_1_ni_20240327.laz 3369 1340 347095.0 [m^2]
#> 3 3dm_32_548_5724_1_ni_20240327.laz 10000 3426 988760.1 [m^2]
#> 4 3dm_32_548_5725_1_ni_20240327.laz 10000 4247 987443.7 [m^2]
#> pointdensity pulsedensity
#> 1 0.009481486 [1/m^2] 0.008415787 [1/m^2]
#> 2 0.009706277 [1/m^2] 0.003860615 [1/m^2]
#> 3 0.010113677 [1/m^2] 0.003464946 [1/m^2]
#> 4 0.010127160 [1/m^2] 0.004301005 [1/m^2]