prof_class: Classification of mean catenas

View source: R/prof_class.R

prof_classR Documentation

Classification of mean catenas

Description

Classifies mean catenas derived from area2catena into Landscape Units and Terrain Components.

Usage

prof_class(catena_file = NULL, catena_head_file = NULL,
  svc_column = "svc", dir_out = "./", luoutfile = "lu.dat",
  tcoutfile = "tc.dat", lucontainstcoutfile = "lucontainstc.dat",
  tccontainssvcoutfile = "r_tc_contains_svc.dat",
  terraincomponentsoutfile = "terraincomponents.dat",
  recl_lu = "reclass_lu.txt", saved_clusters = NULL, seed = 1312,
  resolution = NULL, classify_type = " ", max_com_length = NULL,
  com_length = NULL, make_plots = F, eha_subset = NULL,
  eha_blacklist = NULL, overwrite = F, silent = F,
  plot_silhouette = T)

Arguments

catena_file

Name of file containing mean catena information derived from area2catena.

catena_head_file

Name of file containing meta-information for classification derived from area2catena and adjusted manually (see Notes).

svc_column

Field name in catena_head_file that holds the information of SVCs for generating tccontainssvcoutfile. Default: 'svc'.

dir_out

Character string specifying output directory (will be created; nothing will be overwritten).

luoutfile

Output: Name of file containing the average properties of Landscape Units.

tcoutfile

Output: Name of file containing the average properties of Terrain Components.

lucontainstcoutfile

Output: Name of file containing information wich LU contains which TCs.

tccontainssvcoutfile

Output: Name of file containing information wich TC contains which SVCs.

terraincomponentsoutfile

Output: Name of file containing general properties of TCs.

recl_lu

Output: Name of GRASS reclassification file: EHA -> LU.

saved_clusters

Output: Name of R file that can be used to store LU characteristics for later re-use; set to NULL to omit output (default).

seed

Integer specifying seed for random processes in cluster analysis.

resolution

Integer specifying resolution of profiles/spacing of samples. Typically the resolution of your GRASS location used for area2catena.

classify_type

Type of classification:
' ': (default) unsupervised classification, no saved_clusters will be produced
'save': do unsupervised classification and save cluster centers to saved_clusters for future supervised classification
'load': load cluster centers from existing file and classify according to these clusters (e.g. supervised classification). CURRENTLY NOT SUPPORTED!

max_com_length

Integer defining the maximum common length of profiles, i.e. the maximum number of support points representing each catena during the classification procedure. Too large values consume more memory and computational effort.

com_length

Integer giving common length of profiles, i.e. the number of support points representing each catena during the classification procedure. Too large values consume more memory and computational effort. Overwrites max_com_length.

make_plots

logical; visualisation of classification results written into sub-directory plots_prof_class. WARNING: Consumes a lot of processing time and memory. Default: FALSE.

eha_subset

NULL or integer vector with subset of EHA ids that shall be processed (for debugging and testing).

eha_blacklist

NULL or integer vector with subset of EHA ids that will be excluded (use this for manual exclusion of strange profiles).

overwrite

logical. Shall output of previous calls of this function be deleted? If FALSE the function returns an error if output already exists. Default: FALSE.

silent

logical. Shall the function be silent (also suppressing warnings)? Default: FALSE.

plot_silhouette

logical. Shall a silhouette plot (illustrating the clustering process) be generated? Consumes much memory and processing time and should be disabled, if a memory error is thrown. Will be FALSE if make_plots = FALSE. Default: TRUE.

Details

This function first resamples the catenas derived from area2catena to a common length (com_length or the median number of support points of all catenas but not more than max_com_length). Second, k-means clustering is employed to group the catenas into representative Landscape Units according to parameters given via catena_head_file taking into account hillslope length, shape, and supplemental properties. Third, each group is further partitioned into a given number of Terrain Components in a way that the variance within each TC is minimized considering slope gradient and supplemental information.

Value

Function returns nothing. Output files are written into output directory as specified in arguments.

Note

Function uses output of area2catena. However, no GRASS session needs to be started in this case.

After applying recl_lu, the resulting landscape units raster map in your GRASS location might show gaps depending on the number of generated landscape units as each landscape unit refers to the representative EHA. The gaps can be filled with GRASS function r.grow.

In case of long computation times or memory issues, try make_plots = FALSE and specify an RData file as catena_file (already in area2catena).

Author(s)

Tobias Pilz tpilz@uni-potsdam.de, Till Francke francke@uni-potsdam.de

References

Source code based on SHELL and MATLAB scripts of Till Francke.

lumpR package introduction with literature study and sensitivity analysis:
Pilz, T.; Francke, T.; Bronstert, A. (2017): lumpR 2.0.0: an R package facilitating landscape discretisation for hillslope-based hydrological models. Geosci. Model Dev., 10, 3001-3023, doi: 10.5194/gmd-10-3001-2017

Theory of LUMP:
Francke, T.; Guentner, A.; Mamede, G.; Mueller, E. N. and Bronstert, A (2008): Automated catena-based discretization of landscapes for the derivation of hydrological modelling units. International Journal of Geographical Information Science, Informa UK Limited, 22(2), 111-132, DOI: 10.1080/13658810701300873


tpilz/lumpR documentation built on Aug. 5, 2023, 1:31 a.m.