A bounded editing operation, not identity reconciliation or an acceptance action. Other supplied records, child AOIs and relative evidence links are retained. The Study Area AOI changes only when explicitly supplied. The new context must be beside the source; moving an entire folder remains a separate operation. Prior notes are never replaced.

revise_study_context(
  dsn,
  output_file,
  study_area_name = NULL,
  add_note = NULL,
  report_file = NULL,
  report_purpose = "terrain",
  study_area_boundary = NULL
)

Arguments

dsn

Existing saved Study Area context GeoPackage.

output_file

New .gpkg in the same directory as dsn.

study_area_name

Optional nonempty replacement display name. NULL keeps the existing name. A Study Area record must already exist; no ID is created.

add_note

Optional nonempty scope note appended to analyst_notes with a paragraph break. NULL keeps existing notes. At least one change is required.

report_file

Optional new .html destination in an existing directory. If supplied, render the existing report from the saved revised context.

report_purpose

Report view: terrain (default, preserving existing behavior), definition, or staging. Validated before saving. View selection alone is not an edit; use study_context_report() to change only the report.

study_area_boundary

Optional sf object containing exactly one valid, nonempty XY POLYGON or MULTIPOLYGON with a known CRS. Copies geometry only, retaining the existing Study Area identity/name; input attributes are not imported. Supply a nonempty add_note explaining its source and rationale. Multiple features must first be deliberately combined by the analyst. No dissolve, repair, reprojection, clipping or child-boundary changes occur.

Value

List with context and report paths (report NULL when not requested). Publication is non-replacing, but the two outputs are not one transaction. If rendering fails or execution is canceled after saving, the new context can remain. Retain it for inspection; use read-only reporting to retry. No full revision ledger or approval signature is created by this operation.