Learn R Programming

spatialising (version 0.6.2)

texture_index: Texture index

Description

Calculates texture index -- an average (over an array) of a product of the values of neighboring cells. The value of texture index is between 0 (fine texture), and 1 (coarse texture).

Usage

texture_index(x, ...)

Value

A numeric vector

Arguments

x

SpatRaster or matrix containing two values: -1 and 1

...

Arguments for comat::get_coma()

See Also

kinetic_ising()

Examples

Run this code
data(r_start, package = "spatialising")
texture_index(r_start)
ts1 = kinetic_ising(r_start, B = -0.3, J = 0.7)
texture_index(ts1)
ts2 = kinetic_ising(r_start, B = -0.3, J = 0.7, updates = 2)
texture_index(ts2)

# \donttest{
  library(terra)
  r1 = rast(system.file("raster/r_start.tif", package = "spatialising"))
  texture_index(r1)
  r2 = kinetic_ising(r1, B = -0.3, J = 0.7)
  texture_index(r2)
# }

Run the code above in your browser using DataLab