Run an elevation file through all functions to calculate watershed flow and fill patterns. Based on FlowMapR by R. A. (Bob) MacMillan, LandMapper Environmental Solutions.
flow_mapper(
file,
nrow,
ncol,
grid = NULL,
min_x = 1,
min_y = 1,
missing_value = -9999,
max_area = 10,
max_depth = 0.5,
out_folder = NULL,
out_format = "rds",
clean = FALSE,
clim = NULL,
rlim = NULL,
resume = NULL,
log = TRUE,
report = TRUE,
pitr_method = "landmapr",
verbose = FALSE,
quiet = FALSE,
debug = FALSE
)
Character. Elevation file (see load_file
) for
supported file types.
Numeric. Number of rows in dem file (required for dbf files with a single column, but can be automatically assessed from files with x and y coordinates.
Numeric. Number of columns in dem file (required for dbf files with a single column, but can be automatically assessed from files with x and y coordinates.
Numeric. Grid size in m of the input DEM file
Numeric. Starting x coordinate (in meters)
Numeric. Starting y coordinate (in meters)
Numeric/Character. Symbols which define missing data
Numeric. Largest area of pits to be removed during initial pit removal
Numeric. Largest depth of pits to be removed during initial pit removal
Character. Folder in which to store output files. Defaults to folder in the same location and with the same name as the dem file
Character. What format should the data be output as? "rds"
for R data format (default), "csv" for Comma-separated values. This format
is used for all subsequent functions (i.e. form_mapper()
,
facet_mapper()
and wepp_mapper()
.
Logical. Remove all backup files and output files from previous runs in this folder?
Numeric vector. Column limits if specifying a subset of the dem
Numeric vector. Row limits if specifying a subset of the dem
Character. From which stage should the run be resumed? (see
Logical. Create log file recording progress?
Logical. Create html report of results?
Character. Either "landmapr" or "litap" to define whether to use the LandMapR method for finding a pour point during the pit removal stage (default) or LITAP. The LITAP method defines the pourpoint as the lowest neighbour. The LandMapR defines it as the last possible pour point among neighbouring cells (not necessarily the lowest neighbouring cell).
Logical. Output extra progress messages.
Logical. Suppress all messages.
Logical. If TRUE, output files contain intermediate columns useful for debugging (e.g., 'buffer', 'seqno_buffer', etc.) Default FALSE.
For information regarding loading other file types see
load_file
.
For resuming a run, resume
must be one of
the following:
directions
(Calculating Directions)
watersheds
(Calculating Watersheds)
local
(Initial Pit Removal)
pond
(Calculating Pond Shed Statistics - Second Pit Removal)
fill
(Calculating Fill Shed Statistics - Third Pit Removal)
slope
(Slope Gradient and Curvature values)
idirections
(Calculating Directions on Inverted DEM)
iwatersheds
(Calculating Inverted Watersheds)
inverted
(Inverted Pit Removal)
report
(Create the final report)
# Basic Run
flow_mapper(file = system.file("extdata", "testELEV.dbf", package = "LITAP"),
out_folder = "./testELEV/", nrow = 90, ncol = 90, grid = 1)
#> CALCULATING DIRECTIONS
#> CALCULATING WATERSHEDS
#> REMOVING INITIAL PITS
#> CALCULATING POND (GLOBAL) WATERSHEDS
#> CALCULATING FILL PATTERNS
#> INVERTING DEM
#> CALCULATING INVERTED DIRECTIONS
#> CALCULATING INVERTED WATERSHEDS
#> REMOVING INVERTED PITS
#> CREATING REPORT
#> Run took: 0.27 min
# Specify parameters for initial pit removal
flow_mapper(file = system.file("extdata", "testELEV.dbf", package = "LITAP"),
out_folder = "./testELEV/", nrow = 90, ncol = 90, grid = 1,
max_area = 5, max_depth = 2)
#> CALCULATING DIRECTIONS
#> CALCULATING WATERSHEDS
#> REMOVING INITIAL PITS
#> CALCULATING POND (GLOBAL) WATERSHEDS
#> CALCULATING FILL PATTERNS
#> INVERTING DEM
#> CALCULATING INVERTED DIRECTIONS
#> CALCULATING INVERTED WATERSHEDS
#> REMOVING INVERTED PITS
#> CREATING REPORT
#> Run took: 0.22 min
# Clean up (remove created folder and output)
unlink("./testELEV/", recursive = TRUE)