Skip to contents

Calculate rugosity, fractal dimension, and height for a DEM

Usage

rdh(
  data,
  lvec,
  method_fd = "hvar",
  method_rg = "area",
  parallel = FALSE,
  ncores = (parallel::detectCores() - 1),
  ...
)

Arguments

data

A dem of class RasterLayer.

lvec

Scales to use for calculation.

method_fd

method for the calculation of rugosity and fractal dimension. Can be "hvar", "sd", "cubes", or "area". Defaults to "hvar".

method_rg

Method to be used for the rugosity calculation. Defaults to "area".

parallel

Logical. Use parallel processing? Defaults to FALSE.

ncores

Number of cores to use if parallel = TRUE.

...

Additional arguments see fd().

Value

A dataframe with the three complexity metrics.

Details

Uses area method for rugosity and hvar method for fractal dimension calculations as default.

See also

Examples


dem <- dem_sample(horseshoe, L = 1)
rdh(dem, lvec = c(0.125, 0.25, 0.5, 1))
#> fd calculation using hvar method.
#> rg calculation using area method.
#> L0 is set to the resolution of the raster: 0.01.
#>          R        D         H
#> 1 2.055777 2.223107 0.8746676