texture_index {spatialising}R Documentation

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, ...)

Arguments

x

SpatRaster or matrix containing two values: -1 and 1

...

Arguments for comat::get_coma()

Value

A numeric vector

See Also

kinetic_ising()

Examples

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)


  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)


[Package spatialising version 0.6.0 Index]