get_summary_counts: Create raster layers summarizing point counts for a LAS tile

View source: R/tile_functions.R

get_summary_countsR Documentation

Create raster layers summarizing point counts for a LAS tile

Description

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.

Usage

get_summary_counts(las, res = 10, classes = NULL)

Arguments

las

A LAS object, e.g. imported using prepare_tile.

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.

Value

A terra::SpatRast object with a layer for each requested attribute.

Examples

## 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)


mbedward/CERMBlidar documentation built on April 10, 2024, 2:05 p.m.