wgtcat_gen: Generating weight category polygons from a sample design...

View source: R/weight_categories.R

wgtcat_genR Documentation

Generating weight category polygons from a sample design database

Description

This will take a reporting unit polygon and produce weight category polygons for it using an appropriately formatted sample design database and, optionally, Landscape Management Framework (LMF) stratification polygons. Please note that all input polygons MUST be dissolved by their unique identifiers before use.

Usage

wgtcat_gen(
  reportingunit,
  reportingunit_path = NULL,
  sdd_path,
  lmf_strata = NULL,
  lmf_path = NULL,
  pointvisits = NULL,
  pointvisits_path = NULL,
  output = "sf",
  verbose = FALSE
)

Arguments

reportingunit

An sf polygons object, Spatial Polygons Data Frame, or character string. If a character string, it must be the name of a polygon feature class found in reportingunit_path. Regardless, the feature class must contain exactly one feature representing a single reporting unit.

reportingunit_path

Optional character string. The filepath to the folder or geodatabase containing the feature class specified with the character string reportingunit. Not necessary if reportingunit is either an sf polygon object or Spatial Polygons Data Frame. Defaults to NULL.

sdd_path

Character string. The full filepath to the sample design database (SDD), including .GDB file extension. The SDD must follow the standard schema, including the feature classes: TerrestrialPointEvaluation, TerrestrialSamplePoints, TerrestrialStrata, and TerrestrialSampleFrame.

lmf_strata

Optional sf polygons object, Spatial Polygons Data Frame, or character string. If a character string, it must be the name of a polygon feature class found in reportingunit_path. Regardless, the feature class must contain exactly one feature representing a single reporting unit. Defaults to NULL.

lmf_path

Optional character string. If the weight categories need to account for the Landscape Monitoring Framework (LMF) strata, this must be the full filepath, including file extension, to the geodatabase containing the strata feature class with the LMF strata.

pointvisits

Optional sf points object, Spatial Points Data Frame, or character string. If a character string, it must be the name of a point feature class found in pointvisits_path. Regardless, the feature class must contain the points to be considered and in the same format as the feature class TerrestrailPointEvaluation. This would only be used if you have already restricted which point evaluations should be considered for this process; otherwise, leave NULL and use the full set of points in the sample design database defined by sdd_path. Defaults to NULL.

pointvisits_path

Optional character string. If pointvisits is a character string naming a feature class then this must be the path to the folder or geodatabase containing that feature class. Defaults to NULL.

output

Character string. Determines the output format and must be either "sf" for an sf object or "spdf" for a Spatial Polygons Data Frame. Defaults to "sf"

verbose

Logical. If TRUE then diagnostic messages will be returned throughout processing. Defaults to FALSE.

Value

An sf polygon or Spatial Polygons Data Frame object with the attributes "unique_id" and "area_ha" (area in hectares) projected in Albers Equal Area Conic


nstauffer/aim.analysis documentation built on Nov. 20, 2024, 8:38 a.m.