delineate_basin: Delineate multiple catchments from multiple input points

View source: R/delineate_basin.R

delineate_basinR Documentation

Delineate multiple catchments from multiple input points

Description

This algorithm delineates multiple catchments from input point locations and a drainage direction layer. Catchments are delineated upstream from the point given, until another given outlet point is met. The result is a set of catchments which are unique to the outlets given.

Usage

delineate_basin(
  outlets,
  drain.dir,
  riverID = "riverID",
  output = "vector",
  use_rsaga = TRUE,
  verbose = FALSE
)

Arguments

outlets

An 'sf' point object, with locations of the catchment outlets for delineation. Obtained e.g. with river_outlets

drain.dir

A RasterLayer object of drainage directions.

riverID

Name of the column in outlets with unique identifiers.

output

Whether to return a raster or vectors of delineated catchments. Accepts "vector", "v", "raster", or "r".

use_rsaga

Whether to try using RSAGA for basin vectorization or not. Even if TRUE, requires RSAGA environment to be installed in the system.

verbose

Whether or not print progress indicators.

Value

If output is vector (default), returns vectorized (polygon) catchments specific to the outlet points given. The output is 'sf' POLYGON class with attributes:

  • riverID: The ID given in outlets.

  • NCELLS: The number of raster cells the catchment consists of.

  • AREA_M2: Surface area of the catchment in m^2.

If output is raster, returns a raster with delineated areas.

Author(s)

Vili Virkki, Marko Kallio

Examples

## Not run: 
# to be added

## End(Not run)


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