watershed: Catchment delineation

watershedR Documentation

Catchment delineation

Description

delineate the area covered by a catchment from a SpatRaster with flow direction and a pour-point (catchment outlet).

Usage

## S4 method for signature 'SpatRaster'
watershed(x, pourpoint, filename="",...) 

Arguments

x

SpatRaster with flow direction. See terrain.

pourpoint

matrix or SpatVector with the pour point location

filename

character. Output filename

...

additional arguments for writing files as in writeRaster

Value

SpatRaster

Author(s)

Ezio Crestaz, Emanuele Cordano, Roman Seliger

Examples

elev <- rast(system.file('ex/elev_vinschgau.tif', package="terra"))
flowdir <- terrain(elev, "flowdir")
## pour point at Naturns 
pp <- cbind(653358.3, 5168222)
w <- watershed(flowdir, pp)

terra documentation built on Oct. 14, 2024, 5:07 p.m.