get_max_height: Derive a raster of maximum point height in all or selected...

View source: R/tile_functions.R

get_max_heightR Documentation

Derive a raster of maximum point height in all or selected classes

Description

This is useful for checking purposes. It can also be used to derive an approximate vegetation height layer by setting the classes argument to c(3:5).

Usage

get_max_height(
  las,
  res = 10,
  classes = c(2, 3:5, 9),
  point_height_range = c(0, Inf),
  nodata = NA_real_
)

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

Point classes to include when calculating maximum height for each cell. Default is c(2, 3:5, 9) for ground, vegetation and water point classes.

point_height_range

A two-element numeric vector with the minimum and maximum heights of points to include when determining the maximum height. The values can be in any order. The default is c(0, Inf). This can be used, for example when determining approximate vegetation height, to filter out points with unusually high elevations (e.g. birds or airborne dust). See example below.

nodata

Numeric value for cells with no points. Default is NA_real_.

Value

A RasterLayer in which cell values are maximum point height.

Examples

## Not run: 
# Determine approximate vegetation height for each voxel, setting
# the height range filter based on tallest New South Wales tree height
#
rmaxht <- get_max_height(las, classes = 3:5, point_height_range = c(0, 76))

## End(Not run)


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