get_strata_transform: Create a transformation table for two sets of strata

View source: R/tile_functions.R

get_strata_transformR Documentation

Create a transformation table for two sets of strata

Description

Creates a transformation table that can be used to aggregate a set of input strata into a reduced number of broader output strata. The table can be used with function aggregate_stratum_counts to combine the bands of a point count raster. Usually the reduced strata will cover the same range of heights as the input strata, but it is also possible to create a subset table, e.g. only covering lower heights. The height boundaries of input and output strata must align. For example, if the input strata included two levels for 2-5m and 5-10m, these could be aggregated into a layer for 2-10m but not into a layer for 2-8m.

Usage

get_strata_transform(
  from_strata,
  to_strata,
  flag_lowerht = c(-Inf, -999),
  flag_upperht = c(Inf, 999)
)

Arguments

from_strata

Data frame defining the input strata to be aggregated, in the format used by functions check_strata and get_stratum_counts. The number of strata should be greater than that of to_strata.

to_strata

Data frame defining the broader, transformed output strata, in the format used by functions check_strata and get_stratum_counts. The number of strata should be greater than that of to_strata.

flag_lowerht

Value(s) used for the lower height of the lower-most stratum, which is usually treated as having no lower bound. Default is c(-Inf, -999.0)

flag_upperht

Value(s) used for the upper height of the upper-most stratum, which is usually treated as having no upper bound. Default is c(-Inf, -999.0)

Value

A data frame defining the transformation.

See Also

check_strata and get_stratum_counts

Examples

xtrans <- get_strata_transform(CERMBlidar::StrataCERMB, CERMBlidar::StrataSpecht)

# This transform is invalid


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