outlet: Conveniently query a subset of a matrix

View source: R/outlet.R

outletR Documentation

Conveniently query a subset of a matrix

Description

Convenience function to extract a pixel and its neighbourhood from matrices, e.g. to query raster maps.

Usage

  outlet(map,out,radius = 2)

Arguments

map

matrix

out

Center of the matrix to be extracted

radius

Radius of the matrix to be extracted

Details

The function can be used to find a catchment outlet using a drainage area map generated by atb, when the coordinates are approximately known (for instance from the location of a discharge station). These coordinates can then be used by subcatch. However, note that atb uses a multiple direction flow algorithm, while subcatch uses single flow. Therefore, the drainage area for a pixel calculated by atb is likely to differ from the catchment area identified by subcatch.

Value

Square matrix of size (radius * 2 + 1)

Author(s)

Wouter Buytaert, Imperial College London

References

See https://github.com/ICHydro/topmodel for examples.

See Also

subcatch


topmodel documentation built on Nov. 16, 2022, 9:08 a.m.

Related to outlet in topmodel...