Groups the LandWeb FMA/TSA/FML boundary polygons into ecologically-coherent study areas by assigning each to its dominant ecological unit (an ecoregion by default) via spatial overlap, then names the group after that unit. Small, scattered forest tenures (e.g. a single small FMA) are thereby run inside a larger, ecologically homogeneous area, so the downstream studyAreaANPP PSP catchment is both large enough for trait estimation and ecologically appropriate (species traits can differ across ecoregions, so PSP pools should not span drastically different ecology).

build_studyarea_crosswalk(
  fmas,
  eco,
  eco_field = "REGION_NAM",
  res_m = 240,
  min_area_km2 = 100,
  shortNames = tenureShortNames()
)

Arguments

fmas

sf of the combined LandWeb FMA boundaries (e.g. prepFMAs()).

eco

sf of ecological units to group by (e.g. an ecoregions layer). Supply an ecoprovince or ecodistrict layer to change the grouping granularity.

eco_field

character naming the column in eco that holds each unit's name (default "REGION_NAM", the ecoregion name field).

res_m

numeric simulation pixel size in metres, used only for the mpix size estimate (default 240).

min_area_km2

numeric; member tenures smaller than this are dropped as sliver artifacts (with a message listing them), since they cannot form a meaningful study area. Default 100. Set to 0 to keep everything.

shortNames

the curated tenure short-name table (default tenureShortNames()). Every retained member must appear in it; an uncurated member is an error, since falling back to the long name is exactly the output-key collision the curated codes exist to prevent.

Value

A data.frame crosswalk, one row per member tenure, with columns: group (study-area group token), fma_name (the member's coalesced FMA/TSA/FML identity — the join key back to fmas), name_short (the curated partner-facing tenure code, see tenureShortNames()), company (licensee, for company-driven reruns), province, eco_unit (the dominant ecological unit), area_km2, and mpix (approx. pixels at res_m). Sort/split by group to get each study area's member set.

Details

The grouping unit is a parameter: pass a coarser layer (ecoprovinces) for fewer, larger groups, or a finer one (ecodistricts) to subdivide groups that prove too large computationally. Membership is by verified spatial overlap against the current FMA layer — never by company/tenure labels, which drift over time (a polygon labelled for one licensee in an older file may belong to another now).