burn_in {rdwplus}R Documentation

Burn in streams to a digital elevation model

Description

Burning-in streams (also called 'drainage reinforcement') ensures flow direction and accumulation grids based on the digital elevation model will correctly identify the stream path.

Usage

burn_in(dem, stream, out, burn = 10, overwrite = FALSE)

Arguments

dem

Digital elevation model raster in the GRASS mapset.

stream

Binary stream raster in the GRASS mapset.

out

Name of output to be created in the GRASS mapset.

burn

The magnitude of the drainage reinforcement in elevation units. Defaults to 10 elevation units.

overwrite

A logical indicating whether the file out should be overwritten in the mapset and on disk. Defaults to FALSE.

Value

Nothing. A raster with the name out will be written to the current GRASS mapset.

Examples

# Will only run if a GRASS session is initialised
if(check_running()){
# Load data set
dem <- system.file("extdata", "dem.tif", package = "rdwplus")
stream_shp <- system.file("extdata", "streams.shp", package = "rdwplus")
set_envir(dem)
raster_to_mapset(dem)
vector_to_mapset(stream_shp)

# Create binary stream
rasterise_stream("streams", "streams_rast")
reclassify_streams("streams_rast", "streams_binary", out_type = "binary")

# Burn dem 
burn_in(dem = "dem.tif", stream = "streams_binary", 
out = "dem_burn", burn = 10, overwrite = FALSE)

# Plot
plot_GRASS("dem_burn", col = topo.colors(10))
}

[Package rdwplus version 1.0.0 Index]