R function for landform classification on the basis od Topographic Position Index

The function allows to perform landform classification on the basis of the Topographic Position Index calculated from an input Digital Terrain Model ('RasterLayer' class).

landfClass(x, scale = 3, sn = 3, ln = 7, n.classes = "six",
  add.tpi = FALSE, stand.tpi = FALSE)

Input DTM (RasterLayer class).


Size (in terms of cells per side) of the neighborhood (moving window) to be used; it must be an odd integer.


If the 10-class classification is selected, this paramenter sets the s(mall) n(eighborhood) to be used.


If the 10-class classification is selected, this paramenter sets the l(arge) n(eighborhood) to be used.


"six" or "ten" for a six- or ten-class landform classification.


Set to TRUE will return a TPI raster (FALSE is default).


Specifies whether the returned TPI raster will be un- or standardized (FALSE is default).


The TPI is the difference between the elevation of a given cell and the average elevation of the surrounding cells in a user defined moving window. For landform classification, the TPI is first standardized and then thresholded; to isolate certain classes, a slope raster (which is internally worked out) is also needed. For details about the implemented classification, see:

Two methods are available: -the first (devised by Weiss) produces a 6-class landform classification comprising: -- valley -- lower slope -- flat slope -- middle slope -- upper slope -- ridge -the second (devised by Jennes) produces a 10-class classification comprising: -- canyons, deeply incised streams -- midslope drainages, shallow valleys -- upland drainages, headwaters -- u-shaped valleys -- plains -- open slopes -- upper slopes, mesas -- local ridges, hills in valleys -- midslope ridges, small hills -- mountain tops, high ridges

The second classification is based on two TPI that make use of two neighborhoods (moving windows) of different size: a s(mall) n(eighborhood) and a l(arge) n(eighborhood), defined by the parameters sn and ln.

Besides rasters representing the different landform classes, the function optionally returns the TPI raster, either un- or standarized. The output rasters are plotted on the R graphic console and returned by the function (as objects of 'RasterLayer' class) within a list.

  • landfClass
#load a sample Digital Terrain Model
dtm <- raster::raster(system.file("external/maungawhau.grd", package="gdistance"))

#perform the 6-class landform analysis (which is default);
# a moving window of dimension 3 (in terms of cells per side) is used
res <- landfClass(x=dtm, scale=3)

# }
Documentation reproduced from package GmAMisc, version 1.0.0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.