Join OCSGE Spatial Data with Species Traits
join_ocsge_species.RdThis function merges a spatial `sf` object containing OCSGE (Occupation du Sol à Grande Échelle) polygons with a dictionary of species-specific traits (e.g., habitat suitability weights, resistance). It handles potential code bridging via a reference dictionary.
Usage
join_ocsge_species(
sf_obj,
species_pattern,
code_col = "code_cs",
species_dict = spacemodR::ocsge_species_dict,
ref_dict = spacemodR::ref_ocsge
)Arguments
- sf_obj
A spatial
sfobject containing the landscape polygons.- species_pattern
Character. A regex pattern or exact name to search for in the species dictionary.
- code_col
Character. The name of the column in
sf_objthat contains the OCSGE codes. Default is"code_cs".- species_dict
A data.frame containing the species traits. Defaults to
spacemodR::ocsge_species_dict.- ref_dict
An optional reference data.frame to bridge codes between the spatial object and the species dictionary. Defaults to
spacemodR::ref_ocsge.