Fetch each jurisdictional source in caribouRangeLayers(), drop locally extirpated herds, label it from its labelCols, tag its juris and boreal/mountain ecotype, clip it to studyArea with spatialutils::prep_vector(), and bind the intersecting pieces into one layer. Sources that do not reach the study area are dropped, so this works unchanged for a study area in any jurisdiction.

buildCaribouRanges(
  studyArea,
  destinationPath,
  targetCRS = LandWebCRS,
  layers = caribouRangeLayers()
)

Arguments

studyArea

A SpatVector (or anything terra::vect() accepts).

destinationPath

Directory for downloads/extraction.

targetCRS

Target CRS (default LandWebCRS).

layers

Candidate-source table (default caribouRangeLayers()).

Value

A SpatVector with columns Name, juris and ecotype, or NULL if no source intersects studyArea.

Details

Range names are normalised via an explicit spelling table (see the source of caribouRangeLayers()): a range that two provinces spell differently would otherwise appear as two reporting units, since the summaries group by name rather than by feature. That same name-grouping is what stitches a cross-border range whose two provincial shares carry the same name — Chinchaga and Narraway — back into a single reporting unit.