facet_mapper | R Documentation |
This function takes backup data frame output from flow_mapper()
and
form_mapper()
calculates fuzzy attributes (among other metrics). Based on
FacetMapR by R. A. (Bob) MacMillan, LandMapper Environmental Solutions.
facet_mapper(
folder,
arule = NULL,
crule,
edge_row = NULL,
edge_col = NULL,
procedure = "lsm",
zone = NULL,
clean = FALSE,
resume = NULL,
log = TRUE,
verbose = FALSE,
quiet = FALSE,
debug = FALSE
)
folder |
Character. Location of |
arule |
Character. Location of ARULE file. If NULL, A Rules are derived from the dem file (see Details). |
crule |
Character. Location of CRULE file |
edge_row |
Numeric. Number of rows to remove around the edge of the dem before deriving the A Rules. Default (NULL) results in removing 5% of the rows per side (total of 10%). |
edge_col |
Numeric. Number of cols to remove around the edge of the dem before deriving the A Rules. Default (NULL) results in removing 5% of the cols per side (total of 10%). |
procedure |
Character. Which procedure to use. One of |
zone |
file. If |
clean |
Logical. Remove all output files from previous runs in this folder? |
resume |
Character. From which stage should the run be resumed? (see |
log |
Logical. Create log file recording progress? |
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. |
Based on the technique described in Li et al. 2011, if no arule
file is
provided, the ARULE cutoffs are calculated from the form_mapper()
dem
files. These A Rules are saved as afile_derived.csv
in the folder
provided. The topographic derivative percentiles are stored to
topographic_derivatives.csv
, also in the folder
.
Procedure lsm
refers to the landform segmentation model (LSM) offered in
the original LandMapR. Procedure bc_pem
refers to calculating variables
required for the British Columbia Predictive Ecosystem Mapping
Direct-to-Site-Series program (BC-PEM DSS).
For resuming a run, resume
must be
one of the following:
attributes
classes
@references Sheng Li, David A. Lobb, Brian G. McConkey, R. A. MacMillan, Alan Moulin, and Walter R. Fraser. 2011. Extracting topographic characteristics of landforms typical of Canadian agricultural landscapes for agri-environmental modeling. I. Methodology. Canadian Journal of Soil Science 91(2), 251-266. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.4141/CJSS10080")}.
# 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)
# And form_mapper()
form_mapper(folder = "./testELEV/")
# Let's use the crule file included in the LITAP package
crule <- system.file("extdata", "crule.dbf", package = "LITAP")
crule
# Run facet_mapper() - Derive A Rules
facet_mapper(folder = "./testELEV/", arule = NULL, crule = crule)
# Derive A Rules, omitting rows and cols from the calculation
facet_mapper(folder = "./testELEV/", arule = NULL, crule = crule,
edge_row = 3, edge_col = 1)
# Run facet_mapper() - supply A Rules
arule <- system.file("extdata", "arule.dbf", package = "LITAP")
crule <- system.file("extdata", "crule.dbf", package = "LITAP")
facet_mapper(folder = "./testELEV/", arule = arule, crule = crule)
## Not run:
# Now consider using your own Rule files
facet_mapper(folder = "./testELEV/",
arule = "./testELEV/my_arule.dbf",
crule = "./testELEV/my_crule.dbf")
## End(Not run)
# Clean up (remove all output)
unlink("./testELEV/", recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.