Write a one-layer logical terra::SpatRaster
to disk as a GeoTIFF (GTiff, INT1U). No return value.
read_bin
Read a file with values 255 and/or 0, such as the one
produced by write_bin (see Details), and return a logical
terra::SpatRaster (TRUE for 255, FALSE for 0).
Details
write_bin() multiplies the input logical raster by 255 and writes the
result as a GeoTIFF (GTiff) with datatype INT1U. Both write_bin() and
read_bin() set the raster extent to terra::ext(0, ncol(r), 0, nrow(r))
and the CRS to EPSG:7589.