Skip to contents

Determines whether a raster file contains any non-zero values.

Usage

spk_rast_not_empty(f)

Arguments

f

character A single file path to a raster file.

Value

logical TRUE if the raster has any non-zero values, otherwise FALSE.

See also

Examples

if (FALSE) { # \dontrun{
# Check if a raster has non-zero data
has_data <- spk_rast_not_empty("path/to/raster.tif")
} # }