Skip to contents

Pit Remove

Usage

taudem_pitremove(
  input_elevation_grid,
  output_elevation_grid = NULL,
  only_4way_neighbors = FALSE,
  n_processes = getOption("traudem.n_processes", 1),
  depmask = NULL,
  quiet = getOption("traudem.quiet", FALSE)
)

Arguments

input_elevation_grid

Input elevation grid file.

output_elevation_grid

Output elevation grid file.

only_4way_neighbors

Whether to consider only 4 way neighbors.

n_processes

Number of processes for mpiexec. If NULL TauDEM is called without mpiexec.

depmask

Depression mask file (optional).

quiet

If FALSE output from TauDEM CLI is suppressed.

Value

Path to output file (invisibly).

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")
 )
output <- taudem_pitremove(file.path(test_dir, "DEM.tif"))
output
}