Description Usage Arguments Details Value References Examples
Take a DEM, and a return a file comprising the DEM with pits removed.
1 2 |
fun |
the name of pit removal function depending on the version TauDEM in use. |
demfile |
character, path to the input raster file, A digital elevation model (Must be TIFF File). |
felfile |
character, path to the output file. |
number_of_processes, |
number of MPI processes to be used. The default is 8.This is the number of stripes that the domain will be divided into and the number of MPI parallel processes that will be spawned to evaluate each of the stripes. |
four_way_only, |
boolean. If this option is selected Fill ensures that the grid is hydrologically conditioned with cell to cell connectivity in only 4 directions (N, S, E or W neighbors). Each grid cell is conditioned to drain to one of these adjacent, but not diagonal neighbors. |
depmaskfile |
Depression mask indicator grid (depmask) to identify cells that are real pits (or sinks or depressions) and should not be filled. Grid cells with a value of 1 (depmask=1) are not filled. Grid cells with any other value are filled. |
TauDEM version 5.3 has been developed to read any raster supported by GDAL and write grid files in the GeoTiff (.tif) format only. TauDEM reads and writes ESRI shape files and text files generally identified using the .txt extension.
This funciton identifies all pits in the DEM and raises their elevation to the level of the lowest pour point around their edge. Pits, also referred to as depressions or sinks, are low elevation areas in digital elevation models (DEMs) that are completely surrounded by higher terrain. They are generally taken to be artifacts that interfere with the routing of flow across DEMs, so are removed by raising their elevationt, or filling them, to the point where they drain off the edge of the domain. The pour point is the lowest point on the boundary of the "watershed" draining to the pit.If there are specific pits that you do not wish to remove, but do want to remove other pits, pits you want to retain can be marked using the optional depression mask input file (dempask). Elevation values from the input DEM corresponding to grid cells with depmask=1 will not be changed and if these mask cells are at the low points of internally draining depressions, the depression will be retained. "No data" values serve to define edges in the domain, and elevations are only raised to where flow is off an edge or to a grid cell with "no data". An internal "no data" value can placed at the low point of internally draining depressions to stop it being raised by pit filling as an alternative to using a depression mask. This pit removal step is not essential if you have reason to believe that all the pits in your DEM are real. This step can be circumvented by using the raw DEM as input to other TauDEM functions in the place where a filled DEM is used, such as by copying the raw DEM source data onto the file with suffix "fel" to simulate the output of "Pit Remove" without actually removing the pits.
raster object
http://hydrology.usu.edu/taudem/taudem5/help53/PitRemove.html http://hydrology.usu.edu/taudem/taudem5/help/PitRemove.html http://hydrology.usu.edu/taudem/taudem5/TauDEM51CommandLineGuide.pdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# This may take time and requires a connection to internet to download a DEM of size 5.3 MB.
destfile <- "C:/Users/LIssoufou/Downloads/LoganDemo.zip"
exdir <- "C:/Users/LIssoufou/Downloads"
exdir <- paste0 (exdir, "/", "LoganDemo")
dem <- paste0 (exdir, "/","Logan", "/", "logan.tif")
download.file(url = "http://hydrology.usu.edu/taudem/taudem5/LoganDemo.zip", destfile = destfile)
unzip(zipfile = destfile, exdir = exdir)
library(rgdal)
library(raster)
z <- raster(dem)
plot(z)
out_dir <- paste0(exdir, "/", "R_examples")
dir.create(file.path(exdir, 'R_examples'))
out_dir <- paste0(out_dir, "/", "logan_pitremoved.tif")
fel <- Pitremove (demfile = dem, felfile = out_dir)
fel <- raster(paste0(out_dir,"/", prefix, suffix, ".tif"))
plot(fel)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.