delineate: Delineate streams from an elevation model

View source: R/stream.r

delineateR Documentation

Delineate streams from an elevation model

Description

Delineate streams from an elevation model

Usage

delineate(
  dem,
  threshold = 1e+06,
  pretty = FALSE,
  file,
  outlet = NA,
  reach_len,
  ...
)

Arguments

dem

A raster::raster; a digital elevation model.

threshold

The minimum size of a delineated catchment; units are in dem_units^2 (e.g., m^2); default 10 km^2.

pretty

Should flat areas be made prettier? Corresponds to r.watershed -b flag

file

The file name of the raster to be returned, see details.

outlet

The location of the outlet of the target stream, see details.

reach_len

Optional; if provided, reaches will be resized to meet this target length

...

If reach_len is specified, additional parameters to be passed to resize_reaches()

Details

This is a wrapper for r.watershed.

The threshold parameter controls the level of detail in the delineated streams. Higher thresholds result in faster computation and fewer streams in the output. For finer control, see extract_stream().

If outlet is NA (the default), then the largest stream in the area will be set as the outlet, and only streams in that watershed will be used. If a smaller stream is the focus, then outlet can be a pair of x-y coordinates which will determine the farthest downstream point to use.

Streams can be converted to a vector file, see stream_vector().

It is recommended to specify the file parameter (including the extension to specify file format; e.g., .tif, .grd). If not specified, a temp file will be created and will be lost at the end of the R session.

Value

A raster::stack(), containing the drainage map, the flow accumulation map, and the

Examples


    data(kamp_dem)
    x = delineate(kamp_dem)


flee-group/watershed documentation built on July 25, 2022, 12:46 p.m.