
Encode a raster using NOAA Coral Reef Watch product precision
encode_noaa.RdContinuous NOAA CRW v3.1 products are published as signed 16-bit integers
with a scale factor of 0.01 and fill value -32768. Bleaching Alert Area
products are unsigned bytes with fill value 251. This function rounds the
returned values to their published precision and, when filename is given,
writes those storage settings to disk.
Usage
encode_noaa(x, product, filename = "", overwrite = FALSE, wopt = list())Arguments
- x
- product
One of the products supported by
create_climatology().- filename
Optional output filename.
- overwrite
Overwrite an existing file.
- wopt
Additional
terra::writeRaster()options. NOAAdatatype,NAflag,scale, andoffsetsettings take precedence.
Value
A rounded terra::SpatRaster, optionally backed by filename.