add_study_stream_corridor.RdAdds one Stream, or supplies the area of one existing names-only Stream by ID. Existing spatial Streams are not edited. The saved Study Area clips the selected lines first, then their buffered area is clipped again. Original source lines remain in the selected_lines evidence layer; clipped_lines retains the processed geometry and source IDs. Original/retained lengths, buffer parameters, processing CRS/method and clipping details are recorded in the companion GeoPackage and hash-linked context notes.
add_study_stream_corridor(dsn, output_file, lines, stream_name,
distance, unit = "m", add_note, stream_id = NULL,
report_purpose = "definition")Existing study context GeoPackage.
New GeoPackage beside dsn; never overwritten.
Selected line sf with unique nonempty character source_id values. All source fields and native geometry are retained as evidence.
Explicit name for a new Stream.
Required selection rationale.
Optional exact existing names-only Stream ID. Its name is retained. Several names-only Streams require all areas together; partial assignment is refused.
Context revision purpose, normally "definition".
List with context, report (NULL), evidence and stream_id. Evidence is written first and hash-linked in notes; failure can leave unreferenced evidence but never replaces earlier context. No network acceptance, Reach creation, topology repair or enterprise loading occurs.