This function takes backup data frame output from flow_mapper()
and
calculates form, wetness indices, reflief and stream/crest lengths (among
other metrics). Based on FormMapR by R. A. (Bob) MacMillan, LandMapper
Environmental Solutions.
form_mapper(
folder,
str_val = 10000,
ridge_val = 10000,
resume = NULL,
log = TRUE,
clean = FALSE,
verbose = FALSE,
quiet = FALSE,
debug = FALSE
)
Character. Location of flow_mapper()
output
Numeric. Definition of a stream (number of upslope cells)
Numeric. Definition of a ridge (number of downslope cells)
Character. From which stage should the run be resumed? (see
Logical. Create log file recording progress?
Logical. Remove all output files from previous runs in this folder?
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 resuming a run, resume
must be one of the following:
weti
(Calculating Wetness Indices)
relief
(Calculating Relief Derivitives)
length
(Calculating Slope Length)
Note that some variables have a version 1 and a version 2 (i.e. qweti1
and
qweti2
). These reflect variables calculated (1) area based on number of
cells vs. (2) area based on actual grid cell area values.
# First need to run flow_mapper()
flow_mapper(file = system.file("extdata", "testELEV.dbf", package = "LITAP"),
out_folder = "./testELEV/", nrow = 90, ncol = 90, grid = 5)
#> 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
# Now can run form_mapper()
form_mapper(folder = "./testELEV/")
#> SETUP
#> CALCULATING FORM
#> CALCULATING WETNESS INDICES
#> CALCULATING RELIEF DERIVITIVES
#> CALCULATING SLOPE LENGTH
#> Run took: 0.02 min
# Clean up (remove all output)
unlink("./testELEV/", recursive = TRUE)