Write verified Study Area, Stream and Reach masks

write_event_masks(
  context,
  selection,
  group,
  stream_id,
  directory,
  study_mask_source = NULL,
  ...
)

Arguments

context

Current Study Area context GeoPackage.

selection

Current Survey Collection selection GeoPackage.

group

Reviewed acquisition-group GeoPackage.

stream_id

One Stream in the group.

directory

New, nonexistent attempt directory. Existing paths are never replaced.

study_mask_source

Optional previously published masks for the same saved inputs. Reuse its Study Area mask instead of rasterizing that boundary again.

...

Compatibility argument for earlier development previews. New callers use study_mask_source.

Value

Manifest with input hashes, grid, mask hashes, cell counts and software evidence.

Details

Uses terra polygon rasterization with touches=FALSE (cell centers), shared zero anchor and Event spacing. Children intersect their parent masks. Missing Reach polygons block mask creation. Disk-backed compressed Byte GeoTIFFs contain only 1 and NoData. Standard terra rasterize, crop and mask operations write compressed disk-backed rasters with BigTIFF support. No application cell-count, row-width or estimated-disk admission limit is imposed. Actual I/O failures stop publication. A verified manifest is written last. Interrupted attempts are incomplete. Applications should stage the directory and publish it only after checking that the original request is still current. No DEM is read.