Matches explicit saved Reach IDs, never names, row positions or spatial overlap. Only geometry changes; all identities, names, parentage, events and links remain. This does not define how a Reach area should be delineated or approve its scope.

set_study_reach_areas(
  dsn,
  output_file,
  areas,
  id_column = "reach_id",
  add_note,
  report_file = NULL,
  report_purpose = "definition"
)

Arguments

dsn

Existing context GeoPackage containing Reaches.

output_file

New .gpkg beside dsn; existing files are refused.

areas

Nonempty sf of valid finite CRS-defined XY polygons, one per explicitly selected existing Reach. Native geometry is retained.

id_column

Exact text field containing saved reach_id values, default reach_id. Every value must match a different existing Reach. Other source attributes are ignored, not used to rename or reparent records.

add_note

Required source and delineation/revision rationale.

report_file

Optional new .html destination in an existing directory.

report_purpose

Report view: definition (default), terrain or staging.

Value

List of context and report paths. When Reaches have no geometry, supply every recorded Reach's area together: schema 1 cannot mix missing and supplied areas. Once areas exist, a subset may be revised in the same semantic CRS and polygon class. No repair, dissolve, reprojection, clipping, new identities, Survey Events or source-ID reconciliation is performed. Existing outputs are never replaced. Rendering failure may leave the saved context; keep it and retry read-only reporting. A rationale is not a full provenance ledger.