Restoration Status Summary#
Restoration Status Summary (RSS) computes patch-based connectivity indices for a binary raster map. RSS characterises the spatial structure of the foreground by analysing the size distribution of individual patches, providing a set of indices that quantify landscape connectivity and restoration potential. Further details about Restoration Status Summary analysis are available in the RSS product sheet.
Connectivity Indices#
RSS computes the following indices:
Full Name |
Code |
Unit |
Description |
|---|---|---|---|
Critical New Object Area |
CNOA |
pixels |
Minimum area of a new patch that would increase connectivity |
Equivalent Connected Area |
ECA |
pixels |
Area of a single patch providing the same connectivity as observed |
Reference Area Coverage |
RAC |
% |
Percentage of foreground relative to total foreground and background |
Coherence |
COH |
% |
Percentage of foreground pixels effectively connected |
Restoration Potential |
REST_POT |
% |
Percentage of foreground pixels that could improve connectivity (100 - COH) |
Usage#
import pyguidos as pg
result = pg.rss(
in_tiff="my_map.tif",
outdir="output/",
stat_files=True,
verb=False
)
Parameters#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
str or Path |
– |
Path to input GeoTIFF |
|
str or Path |
None |
Output directory |
|
bool |
True |
Write statistics to files |
|
bool |
False |
Print progress messages |
Output Files#
File |
Description |
|---|---|
|
Statistics report with all connectivity indices |
Results#
The rss() function returns a dict. The structure is nested as follows:
- output paths (
dictorNone) path txt (
str): Absolute path to the comprehensive statistics report.Note: This key is
Noneifstat_files=False.
- output paths (
- input stats (
dict) foreground pxl (
int): Count of pixels with value 2 (Forest).background pxl (
int): Count of pixels with value 1 (Background).missing pxl (
int): Count of NoData (0) pixels.backgr3 pxl (
int): Count of special background class 3 pixels.backgr4 pxl (
int): Count of special background class 4 pixels.
- input stats (
- output stats (
dict) total patches (
int): The total number of discrete patches identified in the landscape.average patch size (
float): The mean size of patches (usually in pixel units).median patch size (
float): The median size of patches.largest patch size (
int): The size of the largest single patch found.CNOA (
float): Component-wise Normalized Occupied Area.ECA (
float): Equivalent Connected Area.RAC (
float): Relative Area of Connectivity.COH (
float): Cohesion index.REST_POT (
float): Restoration Potential index.
- output stats (
result = pg.rss("my_map.tif")
# Access statistics
print(result.keys())
# dict_keys(['output paths', 'input stats', 'output stats'])
# Input pixel counts
print(result["input stats"])
# {'foreground pxl': 12500, 'background pxl': 37500,
# 'missing pxl': 0, 'backgr3 pxl': 0, 'backgr4 pxl': 0}
# Connectivity indices
print(result["output stats"])
# {'total patches': 142, 'average patch size': 88.0,
# 'median patch size': 12.0, 'largest patch size': 8542,
# 'ECA': 8764.3, 'COH': 70.1, 'CNOA': 3, 'REST_POT': 29.9, 'RAC': 25.0}
# Output file paths
print(result["output paths"])
# {'path txt': 'output/my_map_rss.txt'}
Patch Statistics#
In addition to the connectivity indices, RSS also reports basic patch size statistics:
Total patches: total number of foreground patches
Average patch size: mean patch size in pixels
Median patch size: median patch size in pixels
Largest patch size: size of the largest patch in pixels