R/define_study_streams.R
define_study_streams.RdCreates new local Stream identities for an explicitly chosen initial inventory. This is not an append, replacement, or archived/enterprise ID reconciliation operation. Existing Streams or linked network/hierarchy records are refused. No Study Area boundary, terrain, Reach or acquired Survey Event is required.
define_study_streams(
dsn,
output_file,
streams,
name_column = "stream_name",
add_note,
report_file = NULL,
report_purpose = "definition"
)Existing saved Study Area context GeoPackage.
New .gpkg beside dsn; existing files are refused.
Nonempty data frame or sf with one row per chosen Stream. Optional areas must be valid nonempty finite XY POLYGON/MULTIPOLYGON geometry with a known CRS. Native coordinates/CRS are retained. No dissolve, clipping, reprojection or containment/coverage acceptance is performed.
Exact character column containing explicit Stream names. Only this column and optional geometry are imported. Other source attributes, including any identities, are not adopted. Names are trimmed and must be nonempty and unique ignoring case for this initial-definition interface.
Required source and naming/segmentation rationale. Appended to existing notes; not an approval signature or structured provenance ledger.
Optional new .html path in an existing directory.
Report view, default definition; terrain/staging supported.
List of context and report paths, with report NULL when not requested. Existing context and other records/links are retained. Saving and rendering are not one transaction: render failure can leave the saved context. Reopen it for report recovery rather than generating another set of identities.