View source: R/tile_functions.R
get_summary_counts | R Documentation |
Given a LAS tile and a raster cell size, this function creates a raster
object with a band for each point class being considered. Cell values in each
band give the point count over all heights for the given point class. A layer
can also be created for all three vegetation classes combined. The resulting
layers are returned as a terra::SpatRast
object.
get_summary_counts(las, res = 10, classes = NULL)
las |
A LAS object, e.g. imported using |
res |
Raster cell size. The default value is 10 which assumes that the LAS data is in a projected coordinate system with metres as units. |
classes |
An integer vector specifying the point classes to summarize. May include 2 (ground), 3 (low veg), 4 (mid veg), 5 (high veg), 35 (all veg - the three vegetation classes combined), 6 (buildings) and 9 (water). The default is to summarize all of the above. |
A terra::SpatRast
object with a layer for each requested
attribute.
## Not run:
# Get summary counts at 10m raster cell size for all supported
# point classes
rcounts <- get_summary_counts(las)
# Get summary counts for ground and combined vegetation classes
# at 2m resolution
rcounts <- get_summary_counts(las, res = 2, classes = c("ground", "allveg"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.