Reconstructs the clip polygon that was supplied to preprocess_species()
from the metadata stored on the BirdFlow object. Returns an
sf polygon in the model's CRS (crs(x)).
Value
An sf object containing the clip polygon, or NULL if the
model is unclipped or the clip metadata is unknown (older models
preprocessed before this metadata was captured).
Details
The polygon is stored as a flat data frame (see clip_to_dataframe()) so
it can be serialized as part of the model. get_clip() delegates the
data-frame-to-polygon conversion to dataframe_to_clip() and wraps the
result in an sf object; pass the result through terra::vect() if you'd
prefer a terra::SpatVector.
Examples
library(BirdFlowModels)
get_clip(amewoo) # NULL — fixture predates clip metadata
#> NULL
