Stream Definition By Threshold
Arguments
- input_area_grid
File name for grid to be thresholded.
- output_stream_raster_grid
File name for stream raster grid.
- mask_file
File name for grid used to mask the output stream raster, or general thresholded grid.
- threshold_parameter
Threshold parameter.
- n_processes
Number of processes for
mpiexec
. IfNULL
TauDEM is called without mpiexec.- quiet
If
FALSE
output from TauDEM CLI is suppressed.
Examples
if (FALSE) { # interactive() && traudem::can_register_taudem()
test_dir <- withr::local_tempdir()
dir.create(test_dir)
file.copy(
system.file("test-data", "DEM.tif", package = "traudem"),
file.path(test_dir, "DEM.tif")
)
filled_pit <- taudem_pitremove(file.path(test_dir, "DEM.tif"))
outputs <- taudem_d8flowdir(filled_pit)
outputs
contributing_area_grid <- taudem_aread8(outputs$output_d8flowdir_grid)
contributing_area_grid
thresholded <- taudem_threshold(contributing_area_grid)
thresholded
}