form_mapper: Map form and relief of the landscape

Description Usage Arguments Details Examples

View source: R/form_mapper.R

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
form_mapper(
  folder,
  str_val = 10000,
  ridge_val = 10000,
  resume = NULL,
  log = TRUE,
  clean = FALSE,
  verbose = FALSE,
  quiet = FALSE,
  debug = FALSE
)

Arguments

folder

Character. Location of flow_mapper() output

str_val

Numeric. Definition of a stream (number of upslope cells)

ridge_val

Numeric. Definition of a ridge (number of downslope cells)

resume

Character. From which stage should the run be resumed? (see

log

Logical. Create log file recording progress?

clean

Logical. Remove all output files from previous runs in this folder?

verbose

Logical. Output extra progress messages.

quiet

Logical. Suppress all messages.

debug

Logical. If TRUE, output files contain intermediate columns useful for debugging (e.g., 'buffer', 'seqno_buffer', etc.) Default FALSE.

Details

For resuming a run, resume must be one of the following:

  1. weti (Calculating Wetness Indices)

  2. relief (Calculating Relief Derivitives)

  3. 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.

Examples

1
2
3
4
5
6
7
8
9
# 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)

# Now can run form_mapper()
form_mapper(folder = "./testELEV/")

# Clean up (remove all output)
unlink("./testELEV/", recursive = TRUE)

steffilazerte/LITAP documentation built on Feb. 9, 2022, 8:11 a.m.