Checks that an object is a readable terra::SpatRaster with dimensions,
layers, and values suitable for terrain analysis.
Arguments
- x
A raster-like object accepted by
as_bathy().- require_crs
Logical. If
TRUE, require a declared CRS.- require_values
Logical. If
TRUE, require raster values.- allow_multi
Logical. If
FALSE, warn when more than one layer is supplied.
Details
Validation does not decide whether values represent positive depth or
negative elevation. Use check_bathy_units(), set_depth_positive(), or
set_depth_negative() when sign convention matters.
Examples
bathy <- read_bathy(blueterra_example("bathy"))
validate_bathy(bathy)
