Uses the saved NHDPlusV2 reference chain only to identify the approximate downstream cap. The selected outlet is the lowest valid DEM boundary cell near the point where the next downstream NLDI flowline crosses that cap. If NLDI has no continuation, the lowest cap cell near the terminal reference endpoint is used. Reference hydrography does not determine the extracted path.

locate_stream_outlet(
  dem,
  reference_lines,
  search_radius_m = 200,
  crossing_radius_m = 30,
  downstream_lines = NULL
)

Arguments

dem

Existing projected, single-band Hydro DEM path.

reference_lines

CRS-defined NHDPlusV2 lines with `source_id`.

search_radius_m

Radius around the reference endpoint used to inspect the Stream cap.

crossing_radius_m

Maximum boundary-cell distance from the downstream reference crossing.

downstream_lines

Optional downstream NLDI lines for deterministic or offline execution. When NULL, NLDI is queried from the terminal COMID.

Value

One-row data frame containing the selected raster cell and evidence.