river_outlets: Identify locations from where to start catchment delineation.

View source: R/river_outlets.R

river_outletsR Documentation

Identify locations from where to start catchment delineation.

Description

The function identifies the coordinates of raster cells which are just upstream from river confluence points identified from a river network layer. The cell just upstream from confluence allows delineation of segment specific catchments.

Usage

river_outlets(river, drain.dir)

Arguments

river

An 'sf' linestring feature representing a river network.

drain.dir

A RasterLayer object of drainage directions.

Details

The function logic is such that it looks at the last node-pair of each segment in the river network. The angle of the last node pair is computed, and the raster cell from where the last node-pair originated is identified. Note that the logic of the function requires that the river network is derived from the same raster than the drainage directions input to the function.

Note: Drainage directions must be coded in 1-128 as follows:

  • 1:East

  • 2:Southeast

  • 4:South

  • 8:Southwest

  • 16:West

  • 32:Northwest

  • 64:North

  • 128:Northeast

Value

Returns an 'sf' point object of identified raster cell centers. Includes all the attributes in the given river object.


mkkallio/hydrostreamer documentation built on Oct. 14, 2023, 9:38 p.m.