Package 'landform'

Title: Topographic Position Index-Based Landform Classification
Description: Provides a function for classifying a landscape into different categories based on the Topographic Position Index (TPI) and slope. It offers two types of classifications: Slope Position Classification, and Landform Classification. The function internally calculates the TPI for the given landscape and then uses it along with the slope to perform the classification. Optionally, descriptive statistics for every class are calculated and plotted. The classifications are useful for identifying the position of a location on a slope and for identifying broader landform types.
Authors: Gianmarco Alberti [aut, cre]
Maintainer: Gianmarco Alberti <[email protected]>
License: GPL (>= 2)
Version: 0.2
Built: 2024-10-30 04:30:01 UTC
Source: https://github.com/cran/landform

Help Index


Landform Classification

Description

This function classifies a landscape into different categories based on the Topographic Position Index (TPI) and slope. It offers two types of classifications: Slope Position Classification (Weiss 2001) and Landform Classification (Weiss 2001; Jenness 2003).
Visit this LINK to access the package's vignette.

Usage

landform(
  x,
  scale = 3,
  sn = 3,
  ln = 7,
  class.type = "slope.position",
  descriptive = FALSE,
  leg.pos = "topright",
  leg.cex = 0.65
)

Arguments

x

A RasterLayer or a SpatRaster object representing the landscape.

scale

The size of the neighbourhood for calculating the TPI. Default is 3.

sn

The size of the small neighbourhood for calculating the TPI in the Landform Classification. Default is 3.

ln

The size of the large neighbourhood for calculating the TPI in the Landform Classification. Default is 7.

class.type

The type of classification to be performed. Options are "slope.position" for Slope Position Classification and "landform.classification" for Landform Classification. Default is "slope.position".

descriptive

A logical parameter (default is FALSE). If set to TRUE, the function will calculate and return additional descriptive statistics for each class. These statistics include the count of pixels, total area (in Km2), and percentage of the total area for each class. Additionally, a bar plot showing the area of each class will be generated.

leg.pos

The position of the legend in the plot. Default is "topright".

leg.cex

The magnification to be used for sizing the legend relative to the current setting of 'cex'. Default is 0.65.

Details

The function internally calculates the Standardised Topographic Position Index (TPI) for the given landscape. The TPI is calculated as the difference between the elevation of each cell in the landscape and the mean elevation of its neighbouring cells. The TPI is then standardised by dividing the difference between each cell's TPI and the mean TPI of its neighbouring cells by the standard deviation of the TPI values within the neighbourhood.

The Slope Position Classification uses the standardised TPI and slope to classify the landscape into six categories: Valley, Lower Slope, Flat Slope, Middle Slope, Upper Slope, and Ridge. This classification is useful for identifying the position of a location on a slope (Weiss 2001).

The Landform Classification uses two standardised TPI grids at different scales to classify the landscape into ten categories: Canyons, Midslope Drainage, Upland Drainage, U-shaped Valleys, Plains, Open Slopes, Upper Slopes, Local Ridges, Midslope Ridges, and Mountain Tops. This classification is useful for identifying broader landform types (Weiss 2001; Jenness 2003).

As for the descriptive statistics returned by the function, please note that if the input raster layer is not in a projected coordinate system, the area calculation for each class (which is based on the resolution of the raster and the count of cells in each class) may not accurately represent the true area on the ground. Therefore, it's recommended to use a raster layer in a suitable projected coordinate system for your area of interest to ensure accurate area calculations.

Value

The package plots the raster of all the classes combined. If the descriptive parameter is set to TRUE, a bar plot showing the area of each class is generated. A list of SpatRaster objects representing the different classes of the landscape is also returned. The list will contain an item named Descriptive Statistics if the descriptive parameter is set to TRUE. For each class, the item reports the cell counts, the corresponding area (in Km2), and the corresponding percentage.

For the "slope.position" classification, the returned layers are:

  • "all": all classes combined

  • "Valley": TPI <= -1

  • "Lower Slope": -1 < TPI <= -0.5

  • "Flat Slope": -0.5 < TPI < 0.5 and slope <= 5

  • "Middle Slope": -0.5 < TPI < 0.5 and slope > 5

  • "Upper Slope": 0.5 < TPI <= 1

  • "Ridge": TPI > 1

For the "landform.classification", the returned layers are:

  • "all": all classes combined

  • "Canyons-Deeply Incised Streams": sn <= -1 and ln <= -1

  • "Midslope Drainage-Shallow Valleys": sn <= -1 and -1 < ln < 1

  • "Upland Drainages-Headwaters": sn <= -1 and ln >= 1

  • "U-shaped Valleys": -1 < sn < 1 and ln <= -1

  • "Plains": -1 < sn < 1 and -1 < ln < 1 and slope <= 5

  • "Open Slopes": -1 < sn < 1 and -1 < ln < 1 and slope > 5

  • "Upper Slopes-Mesas": -1 < sn < 1 and ln >= 1

  • "Local Ridges-Hills in Valley": sn >= 1 and ln <= -1

  • "Midslopes Ridges-Small Hills in Plains": sn >= 1 and -1 < ln < 1

  • "Mountain Tops-High Ridges": sn >= 1 and ln >= 1

References

Weiss, A. (2001). Topographic Position and Landforms Analysis. Poster presentation, ESRI User Conference, San Diego, CA.

Jenness, J. (2003). TPI ArcView Extension. Jenness Enterprises. Available at: http://www.jennessent.com/arcview/tpi.htm

See Also

raster, rast, focal, terrain, plot

Examples

# Create a toy elevation dataset
# Define the raster dimensions
nrows <- 100
ncols <- 100

# Create a matrix with random values
set.seed(123) # to make the example reproducible
mat <- matrix(runif(nrows*ncols), nrow=nrows, ncol=ncols)

# Convert the matrix to a raster object
library(terra)
elev <- rast(mat)

# EXAMPLE 1

# Run the analysis
result <- landform(elev, scale = 3, class.type = "slope.position")

# EXAMPLE 2

# Run the analysis
result <- landform(elev, class.type = "landform.classification", sn=3, ln=11)