Creates a new context GeoPackage, separate from the network bundle. Supplied identities, optional polygon AOIs, inventory, forensic interpretations and notes are retained without reconciliation or acceptance. External network and terrain-manifest references are relative to the context file's directory and pinned by SHA-256. Move the whole folder, not just this GeoPackage.
write_study_context(
dsn,
study_area = NULL,
streams = NULL,
reaches = NULL,
survey_events = NULL,
reconstruction = NULL,
network = NULL,
folder_manifest = NULL,
terrain_notes = NA_character_,
analyst_notes = NA_character_,
analysis_reference = NULL,
terrain_sources = NULL,
terrain_evidence = NULL,
terrain_processing = NULL,
vertical_reference = NULL
)New local .gpkg path in an existing directory.
Context tables accepted by terrain_development_summary(). Only documented context columns are supported; unsupported columns/types fail rather than being dropped. Survey date components must be integer columns. Optional source_dataset and availability_notes are text. AOIs must be XY POLYGON or MULTIPOLYGON sf.
Optional root-relative path to an existing network GeoPackage.
Optional root-relative path to a terrain intake JSON. Explicit event links in that manifest select external GeoTIFF grids; direct SpatRaster objects and an independent overview DEM are not persisted.
Optional scalar text, as in the summary.
Optional saved project-choice table with component, value, basis, evidence, analyst and recorded_at character columns. Requires a Study Area; uses schema 2. Prefer record_study_analysis_reference() for edits.
Optional attributed source-use table, as documented by record_study_terrain_source(). Requires a Study Area and manifest; uses schema 3.
Optional retained attachment table from retain_study_terrain_evidence(). Requires source-use records; uses schema 4.
Optional ordered preparation accounts from record_study_terrain_processing(). Requires source-use records; uses schema 5.
Optional structured Study Area vertical target from validate_study_vertical_reference(). Requires a Study Area; uses schema 7.
Normalized context path invisibly. New-file publication requires hard links. Invalid hierarchy fails; missing AOIs and incomplete evidence remain report findings. This is not a complete FGDB project or event-folder binding.