Exploration of spatial patterns in raster data

Jakub Nowosad, https://jakubnowosad.com/

GI-Forum, ifgi, Münster

2024-12-03

Hi, I am Jakub

Computational geographer: intersection between geocomputation and environmental sciences


Associate Professor at the Adam Mickiewicz University, Poznan; Visiting Scientist, University of Münster


Main scientific interest: spatial pattern analysis, focusing on quantifying and understanding patterns in environmental data

Co-author of a few books on geocomputation and spatial analysis with R and Python, including “Geocomputation with R”


Creator and contributor of various R packages for spatial data processing and visualization


Educator, teaching courses on geocomputation, spatial analysis, programming, and data visualization

Website: jakubnowosad.com

Importance of spatial patterns

Importance of spatial patterns

A relationship between an area’s pattern composition and configuration and ecosystem characteristics (Hunsaker i Levine, 1995; Fahrig i Nuttle, 2005; Klingbeil i Willig, 2009; Holzschuh et al., 2010; Fahrig et al., 2011; Carrara et al., 2015; Arroyo-Rodŕıguez et al. 2016; Duflot et al., 2017, many others..)

Defining spatial patterns

Defining spatial patterns

  1. Extent: the extent of the study area
  2. Scale: the size of the area over which the metrics are calculated
  3. Resolution: the size of the cells in the raster
  4. Categorization: the categories used in the analysis

Describing categorical spatial patterns

Landscape metrics

Quantify the composition and configuration of spatial patterns of categorical rasters


Three different levels: patch, class, and landscape (here we focus on the landscape level)


Groups of metrics: (1) area and edge metrics, (2) shape metrics, (3) core metrics, (4) aggregation metrics, (5) diversity metrics, (6) complexity metrics


Landscape metrics

SHDI - Shannon’s diversity index: takes both the number of classes and the abundance of each class into account

AI - Aggregation index

Boltzmann-entropy-inspired metrics

How to measure the complexity of a landscape pattern?

One of the possible solutions is to use the Boltzmann entropy, which is a measure of the disorder in a system (Cushman, S. A. (2015), https://doi.org/10.1007/s10980-015-0305-2; Cushman, S. A. (2021). https://doi.org/10.3390/e23121616; Zhao, Y., & Zhang, X. (2019). https://doi.org/10.1007/s10980-019-00876-x)



Zhao’s entropy - Boltzmann entropy-inspired metric

IT-based metrics

Marginal entropy [H(x)] - diversity (composition), from monothematic patterns to multithematic patterns

Relative mutual information [U] - clumpiness (configuration), from fragmented to consolidated patterns

Comparing categorical spatial patterns

Two areas

Inventory of methods

Four main reasons for comparing spatial patterns Long and Robertson (2018, https://doi.org/10.1111/gec3.12356):

  1. Study of change
  2. Study of similarity
  3. Study of association
  4. Spatial model assessment


Classification of methods for comparing spatial patterns in raster data:

Non-spatial Spatial
Overlappling single value, multiple values, raster single value, multiple values, raster
Arbitrary Regions single value single value

The binary difference between two rasters

Overlapping regions, non-spatial context, raster outcome

The difference between a focal measure of two rasters

Overlapping regions, spatial context, raster outcome

Single value measure (e.g., proportion of changed pixels, overall comparison)

Overlapping regions, non-spatial context, single value outcome

Propotion of changed pixels: 0.08

Overall comparison: 0.89

The difference between a measure of two rasters

Arbitrary regions, non-spatial or spatial context, single value outcome

Difference in Zhao’s entropy: 0.002

Difference in marginal entropy: 0.33

Difference in relative mutual information: 0.06

Dissimilarity of a spatial signature between two rasters

Arbitrary regions, non-spatial or spatial context, single value outcome

Jensen-Shannon divergence: 0.023

Spatial signature of the 1st raster: 0.007, 0.011, 0.979, 0, 0.002, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.001, 0, 0, 0, 0, 0, 0, 0

Spatial signature of the 2nd raster: 0.027, 0.032, 0.909, 0.008, 0.004, 0.005, 0.001, 0.008, 0, 0.005, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

Analysing categorical spatial patterns

Analysis of categorical spatial patterns

Each method returning single value can be used in an analysis of spatial patterns

It enables:

  • searching for spatial patterns that are similar or different in terms of the selected metric
  • clustering of spatial patterns based on the selected metric

Searching

Study area:

{supercells}

Searching

Study area:

Top 9 most similar areas to the study area

Clustering

(For example)

Hierarchical clustering:

  • based on a distance matrix
  • spatial signature
  • dissimilarity measure

Non-hierarchical clustering (e.g., k-means):

  • based on the set of derived spatial signatures

Spatial signatures may represent specific properties or general characteristics of the spatial pattern

Additionally, they can be also calculated for a moving window or multiple windows

Spatial signatures depend on the selected extent, scale, resolution, and categorization

Clustering

Land cover raster

Clustering (k-means, k = 5, based on a co-occurrence matrix spatial signature in a 10 by 10 window)

Generalizing and extending

These ideas can be generalized and extended to other types of spatial patterns (e.g., continuous, time-series)

Other signatures, their selection, and application: signatures for multiple spatial scales or signatures for multiple information layers

Selection of appropriate distance measures (for the given problem, data, and used signature)

Information about the spatial pattern can be used in various ways, for example, in spatial modeling, spatial prediction, or spatial optimization

Some tools for exploring spatial patterns: R packages landscapemetrics, bespatial, motif, spquery, patternogram, supercells

PRISM

PRISM

Preservation and RecognItion of Spatial patterns using Machine learning

Marie Skłodowska-Curie Actions Postdoctoral Fellowship (August 2024 – August 2026)

  • “Current machine learning methods, like random forest, are effective but often overlook intricate spatial patterns inherent in ecological processes”
  • “The PRISM project tackles this by integrating and validating spatial patterns within machine learning models”


Get in touch if you want to talk about such topics!

Summary

Summary

  • Spatial patterns are important in environmental sciences
  • Theirs different aspects can be described using landscape metrics, Boltzmann-entropy-inspired metrics, and IT-based metrics
  • Comparing spatial patterns can be done in various ways, depending on their spatial location and extent, context, and outcome
  • Spatial patterns can be searched and clustered based on their properties
  • These ideas can be generalized and extended to other types of spatial patterns (e.g., continuous, time-series)