fd {habtools}R Documentation

Calculate fractal dimension

Description

Calculate fractal dimension

Usage

fd(data, method, lvec, keep_data = FALSE, diagnose = FALSE, ...)

Arguments

data

Digital elevation model of class RasterLayer or a triangular mesh of class mesh3d.

method

If data is a RasterLayer, possible methods are:"hvar", "area", "sd", and "cubes" (defaults to "hvar"). If data is a mesh3d, possible methods are "cubes" and "area" (defaults to "cubes").

lvec

Vector of scales to use for calculation.

keep_data

Logical. Keep data? Default is FALSE.

diagnose

Logical. Show diagnostic plot and metrics?

...

Arguments from method-specific fd_ functions.

Details

Calculates fractal dimension using the specified method. Note that methods are distinctly different and should not be mixed when comparing values for multiple objects. See fd_hvar(), fd_area(), fd_cubes(), fd_sd() for details about each method. If lvec is not specified, a default based on resolution, extent, and method will be used. The cubes method is not recommended if the height range is much smaller than the extent of a 3d object or DEM, which is typically the case for DEMs. Most objects and surfaces are not perfectly fractal. It is recommended to investigate scale transitions by setting diagnose to TRUE.

Value

A value for fractal dimension, typically between 2 and 3 or a list if keep_data = TRUE.

See Also

fd_hvar()

fd_area()

fd_sd()

fd_cubes()

fd_diagnose()

Examples


dem <- dem_crop(horseshoe, x0 = -469, y0 = 1267, L = 2, plot = TRUE)
fd(dem, method = "hvar", lvec = c(0.125, 0.25, 0.5, 1, 2))
fd(dem, method = "area", diagnose = TRUE)
fd(dem, method = "sd")
fd(mcap2, method = "cubes",  plot = TRUE)
fd(mcap2, method = "area",  diagnose = TRUE)


[Package habtools version 1.0.5 Index]