Converts a spatial object (sf, stars, or SpatRaster) into a validated ea_spatial S4 object.
Metadata is extracted from attributes and can be overridden via arguments.
Arguments
- x
A spatial object of class
sf,stars, orSpatRaster.- value_col
Name of the column or layer to use as the primary value. If NULL, auto-selects if only one candidate exists.
- ...
Additional metadata overrides passed to the
ea_spatial()constructor.