Jakub Nowosad, https://jakubnowosad.com/
Remote Sensing and Spatial Modelling Research Group, University of Münster
March, 2025
Hesselbarth, M.H.K., Nowosad, J., de Flamingh, A. et al. Computational Methods in Landscape Ecology. Curr Landscape Ecol Rep 10, 2 (2025). https://doi.org/10.1007/s40823-024-00104-6
Discovering and describing spatial patterns is an important part of many geographical studies, and spatial patterns are linked to natural and social processes.
Evaluation of the susceptibility of forest landscapes to agricultural expansion
Bourgoin et al., 2020, 10.1016/j.jag.2019.101958
Reinterpretation of histological images as categorized rasters and their use for disease classification (e.g., liver cancer)
Kendall et al., 2020, 10.1038/s41598-020-74691-9
Spatial patterns can be quantified using landscape metrics (O’Neill et al. 1988; Turner and Gardner 1991; Li and Reynolds 1993; He et al. 2000; Jaeger 2000; Kot i in. 2006; McGarigal 2014).
Software such as FRAGSTATS, GuidosToolbox, or landscapemetrics has proven useful in many scientific studies (> 12,000 citations).
There is a relationship between an area’s pattern composition and configuration and ecosystem characteristics, such as vegetation diversity, animal distributions, and water quality within this area (Hunsaker and Levine, 1995; Fahrig and Nuttle, 2005; Klingbeil and 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..)
Randomly selected 16 rasters (100x100 cells) with different proportions of forest (green) areas from Land cover data for the year 2016 of the CCI-LC project (simplified into nine categories)
General assumption is that the spatial pattern of a landscape influences the processes that occur within it
In the last 40 or so years, several hundred different landscape metrics were developed
They quantify the composition and configuration of spatial patterns of categorical rasters
Landscape metrics can be calculated for three different levels: patch, class, and landscape (here we (mostly) focus on the landscape level)
They can be divided into several groups, for example:
SHDI:
AI:
Important considerations:
Helpful resources:
metric name type
1 area patch area area and edge metric
2 cai core area index core area metric
3 circle related circumscribing circle shape metric
4 contig contiguity index shape metric
5 core core area core area metric
6 enn euclidean nearest neighbor distance aggregation metric
7 frac fractal dimension index shape metric
8 gyrate radius of gyration area and edge metric
9 ncore number of core areas core area metric
10 para perimeter-area ratio shape metric
11 perim patch perimeter area and edge metric
12 shape shape index shape metric
13 ai aggregation index aggregation metric
14 area_cv patch area area and edge metric
15 area_mn patch area area and edge metric
16 area_sd patch area area and edge metric
17 ca total (class) area area and edge metric
18 cai_cv core area index core area metric
19 cai_mn core area index core area metric
20 cai_sd core area index core area metric
21 circle_cv related circumscribing circle shape metric
22 circle_mn related circumscribing circle shape metric
23 circle_sd related circumscribing circle shape metric
24 clumpy clumpiness index aggregation metric
25 cohesion patch cohesion index aggregation metric
26 contig_cv contiguity index shape metric
27 contig_mn contiguity index shape metric
28 contig_sd contiguity index shape metric
29 core_cv core area core area metric
30 core_mn core area core area metric
31 core_sd core area core area metric
32 cpland core area percentage of landscape core area metric
33 dcad disjunct core area density core area metric
34 dcore_cv disjunct core area core area metric
35 dcore_mn disjunct core area core area metric
36 dcore_sd disjunct core area core area metric
37 division division index aggregation metric
38 ed edge density area and edge metric
39 enn_cv euclidean nearest neighbor distance aggregation metric
40 enn_mn euclidean nearest neighbor distance aggregation metric
41 enn_sd euclidean nearest neighbor distance aggregation metric
42 frac_cv fractal dimension index shape metric
43 frac_mn fractal dimension index shape metric
44 frac_sd fractal dimension index shape metric
45 gyrate_cv radius of gyration area and edge metric
46 gyrate_mn radius of gyration area and edge metric
47 gyrate_sd radius of gyration area and edge metric
48 iji interspersion and juxtaposition index aggregation metric
49 lpi largest patch index area and edge metric
50 lsi landscape shape index aggregation metric
51 mesh effective mesh size aggregation metric
52 ndca number of disjunct core areas core area metric
53 nlsi normalized landscape shape index aggregation metric
54 np number of patches aggregation metric
55 pafrac perimeter-area fractal dimension shape metric
56 para_cv perimeter-area ratio shape metric
57 para_mn perimeter-area ratio shape metric
58 para_sd perimeter-area ratio shape metric
59 pd patch density aggregation metric
60 pladj percentage of like adjacencies aggregation metric
61 pland percentage of landscape area and edge metric
62 shape_cv shape index shape metric
63 shape_mn shape index shape metric
64 shape_sd shape index shape metric
65 split splitting index aggregation metric
66 tca total core area core area metric
67 te total edge area and edge metric
68 ai aggregation index aggregation metric
69 area_cv patch area area and edge metric
70 area_mn patch area area and edge metric
71 area_sd patch area area and edge metric
72 cai_cv core area index core area metric
73 cai_mn core area index core area metric
74 cai_sd core area index core area metric
75 circle_cv related circumscribing circle shape metric
76 circle_mn related circumscribing circle shape metric
77 circle_sd related circumscribing circle shape metric
78 cohesion patch cohesion index aggregation metric
79 condent conditional entropy complexity metric
80 contag connectance aggregation metric
81 contig_cv contiguity index shape metric
82 contig_mn contiguity index shape metric
83 contig_sd contiguity index shape metric
84 core_cv core area core area metric
85 core_mn core area core area metric
86 core_sd core area core area metric
87 dcad disjunct core area density core area metric
88 dcore_cv disjunct core area core area metric
89 dcore_mn disjunct core area core area metric
90 dcore_sd disjunct core area core area metric
91 division division index aggregation metric
92 ed edge density area and edge metric
93 enn_cv euclidean nearest neighbor distance aggregation metric
94 enn_mn euclidean nearest neighbor distance aggregation metric
95 enn_sd euclidean nearest neighbor distance aggregation metric
96 ent shannon entropy complexity metric
97 frac_cv fractal dimension index shape metric
98 frac_mn fractal dimension index shape metric
99 frac_sd fractal dimension index shape metric
100 gyrate_cv radius of gyration area and edge metric
101 gyrate_mn radius of gyration area and edge metric
102 gyrate_sd radius of gyration area and edge metric
103 iji interspersion and juxtaposition index aggregation metric
104 joinent joint entropy complexity metric
105 lpi largest patch index area and edge metric
106 lsi landscape shape index aggregation metric
107 mesh effective mesh size aggregation metric
108 msidi modified simpson's diversity index diversity metric
109 msiei modified simpson's evenness index diversity metric
110 mutinf mutual information complexity metric
111 ndca number of disjunct core areas core area metric
112 np number of patches aggregation metric
113 pafrac perimeter-area fractal dimension shape metric
114 para_cv perimeter-area ratio shape metric
115 para_mn perimeter-area ratio shape metric
116 para_sd perimeter-area ratio shape metric
117 pd patch density aggregation metric
118 pladj percentage of like adjacencies aggregation metric
119 pr patch richness diversity metric
120 prd patch richness density diversity metric
121 relmutinf relative mutual information complexity metric
122 rpr relative patch richness diversity metric
123 shape_cv shape index shape metric
124 shape_mn shape index shape metric
125 shape_sd shape index shape metric
126 shdi shannon's diversity index diversity metric
127 shei shannon's evenness index diversity metric
128 sidi simpson's diversity index diversity metric
129 siei simspon's evenness index diversity metric
130 split splitting index aggregation metric
131 ta total area area and edge metric
132 tca total core area core area metric
133 te total edge area and edge metric
level function_name
1 patch lsm_p_area
2 patch lsm_p_cai
3 patch lsm_p_circle
4 patch lsm_p_contig
5 patch lsm_p_core
6 patch lsm_p_enn
7 patch lsm_p_frac
8 patch lsm_p_gyrate
9 patch lsm_p_ncore
10 patch lsm_p_para
11 patch lsm_p_perim
12 patch lsm_p_shape
13 class lsm_c_ai
14 class lsm_c_area_cv
15 class lsm_c_area_mn
16 class lsm_c_area_sd
17 class lsm_c_ca
18 class lsm_c_cai_cv
19 class lsm_c_cai_mn
20 class lsm_c_cai_sd
21 class lsm_c_circle_cv
22 class lsm_c_circle_mn
23 class lsm_c_circle_sd
24 class lsm_c_clumpy
25 class lsm_c_cohesion
26 class lsm_c_contig_cv
27 class lsm_c_contig_mn
28 class lsm_c_contig_sd
29 class lsm_c_core_cv
30 class lsm_c_core_mn
31 class lsm_c_core_sd
32 class lsm_c_cpland
33 class lsm_c_dcad
34 class lsm_c_dcore_cv
35 class lsm_c_dcore_mn
36 class lsm_c_dcore_sd
37 class lsm_c_division
38 class lsm_c_ed
39 class lsm_c_enn_cv
40 class lsm_c_enn_mn
41 class lsm_c_enn_sd
42 class lsm_c_frac_cv
43 class lsm_c_frac_mn
44 class lsm_c_frac_sd
45 class lsm_c_gyrate_cv
46 class lsm_c_gyrate_mn
47 class lsm_c_gyrate_sd
48 class lsm_c_iji
49 class lsm_c_lpi
50 class lsm_c_lsi
51 class lsm_c_mesh
52 class lsm_c_ndca
53 class lsm_c_nlsi
54 class lsm_c_np
55 class lsm_c_pafrac
56 class lsm_c_para_cv
57 class lsm_c_para_mn
58 class lsm_c_para_sd
59 class lsm_c_pd
60 class lsm_c_pladj
61 class lsm_c_pland
62 class lsm_c_shape_cv
63 class lsm_c_shape_mn
64 class lsm_c_shape_sd
65 class lsm_c_split
66 class lsm_c_tca
67 class lsm_c_te
68 landscape lsm_l_ai
69 landscape lsm_l_area_cv
70 landscape lsm_l_area_mn
71 landscape lsm_l_area_sd
72 landscape lsm_l_cai_cv
73 landscape lsm_l_cai_mn
74 landscape lsm_l_cai_sd
75 landscape lsm_l_circle_cv
76 landscape lsm_l_circle_mn
77 landscape lsm_l_circle_sd
78 landscape lsm_l_cohesion
79 landscape lsm_l_condent
80 landscape lsm_l_contag
81 landscape lsm_l_contig_cv
82 landscape lsm_l_contig_mn
83 landscape lsm_l_contig_sd
84 landscape lsm_l_core_cv
85 landscape lsm_l_core_mn
86 landscape lsm_l_core_sd
87 landscape lsm_l_dcad
88 landscape lsm_l_dcore_cv
89 landscape lsm_l_dcore_mn
90 landscape lsm_l_dcore_sd
91 landscape lsm_l_division
92 landscape lsm_l_ed
93 landscape lsm_l_enn_cv
94 landscape lsm_l_enn_mn
95 landscape lsm_l_enn_sd
96 landscape lsm_l_ent
97 landscape lsm_l_frac_cv
98 landscape lsm_l_frac_mn
99 landscape lsm_l_frac_sd
100 landscape lsm_l_gyrate_cv
101 landscape lsm_l_gyrate_mn
102 landscape lsm_l_gyrate_sd
103 landscape lsm_l_iji
104 landscape lsm_l_joinent
105 landscape lsm_l_lpi
106 landscape lsm_l_lsi
107 landscape lsm_l_mesh
108 landscape lsm_l_msidi
109 landscape lsm_l_msiei
110 landscape lsm_l_mutinf
111 landscape lsm_l_ndca
112 landscape lsm_l_np
113 landscape lsm_l_pafrac
114 landscape lsm_l_para_cv
115 landscape lsm_l_para_mn
116 landscape lsm_l_para_sd
117 landscape lsm_l_pd
118 landscape lsm_l_pladj
119 landscape lsm_l_pr
120 landscape lsm_l_prd
121 landscape lsm_l_relmutinf
122 landscape lsm_l_rpr
123 landscape lsm_l_shape_cv
124 landscape lsm_l_shape_mn
125 landscape lsm_l_shape_sd
126 landscape lsm_l_shdi
127 landscape lsm_l_shei
128 landscape lsm_l_sidi
129 landscape lsm_l_siei
130 landscape lsm_l_split
131 landscape lsm_l_ta
132 landscape lsm_l_tca
133 landscape lsm_l_te
# A tibble: 305 × 6
layer level class id metric value
<int> <chr> <int> <int> <chr> <dbl>
1 1 patch 1 1 perim 1200
2 1 patch 1 2 perim 1200
3 1 patch 1 3 perim 1800
4 1 patch 1 4 perim 1800
5 1 patch 1 5 perim 255000
6 1 patch 1 6 perim 1800
7 1 patch 1 7 perim 1800
8 1 patch 1 8 perim 2400
9 1 patch 1 9 perim 6600
10 1 patch 1 10 perim 6000
# ℹ 295 more rows
# A tibble: 2 × 6
layer level class id metric value
<int> <chr> <int> <int> <chr> <dbl>
1 1 landscape NA NA ai 82.1
2 1 landscape NA NA shdi 1.06
# A tibble: 4 × 6
layer level class id metric value
<int> <chr> <int> <int> <chr> <dbl>
1 1 landscape NA NA ai 98.7
2 1 landscape NA NA shdi 0.0811
3 2 landscape NA NA ai 82.1
4 2 landscape NA NA shdi 1.06
mat_window = matrix(1, nrow = 11, ncol = 11)
w_result = window_lsm(r9, window = mat_window, what = "lsm_l_ai")
plot(r9); plot(w_result$layer_1$lsm_l_ai)
https://r-spatialecology.github.io/landscapemetrics/
# A tibble: 133 × 5
metric name type level function_name
<chr> <chr> <chr> <chr> <chr>
1 area patch area area and edge… patch lsm_p_area
2 cai core area index core area met… patch lsm_p_cai
3 circle related circumscribing circle shape metric patch lsm_p_circle
4 contig contiguity index shape metric patch lsm_p_contig
5 core core area core area met… patch lsm_p_core
6 enn euclidean nearest neighbor distance aggregation m… patch lsm_p_enn
7 frac fractal dimension index shape metric patch lsm_p_frac
8 gyrate radius of gyration area and edge… patch lsm_p_gyrate
9 ncore number of core areas core area met… patch lsm_p_ncore
10 para perimeter-area ratio shape metric patch lsm_p_para
# ℹ 123 more rows
The aim of this exercise is to reproduce some of the results from Ma et al., 2023, Global forest fragmentation change from 2000 to 2020, https://doi.org/10.1038/s41467-023-39221-x. However, this time, we focus on an area of 100 km around Muenster only.
"data/lc_2000.tif"
and "data/lc_2020.tif"
. Visualize both datasets."data/muenster.gpkg"
file into R. Visualize it.res
argument of the project()
function).terra::classify()
. In the original raster datasets, tree cover is represented by values from 25 to 48.