DOI: 10.5281/zenodo.17805915
title: Landscape-scale dynamics of structural Connectivity and restoration priorities for Jaguar habitat in Mexico's central pacific

description: Description of the data 

Google Earth Engine code for Land Cover Classification Reading Training Data and Image Processing and Classification

This script generates a 2018 or 2023 land-cover map using Sentinel-2 imagery and a Random Forest classifier. It creates a median mosaic from cloud-filtered Sentinel-2 images, extracts training data from labeled points, trains a Random Forest model, applies the classification to produce a land-cover raster, visualizes the results, and exports the final classified map to Google Drive.

Code name:

GEE_RF_CLASS_20XX.txt (change year to 2018 or 2023)

Changes in structural connectivity between 2019 and 2023 within the corridors identified by Núñez (2023) using Morphological Spatial Pattern Analysis (MSPA)

This section describes the installation and setup required to run MSPA using the GUIDOS Toolbox in a Linux environment. It installs the necessary system dependencies, prepares the folder structure for MSPA inputs and outputs, loads the forest raster layers for 2019 and 2023, specifies the MSPA parameter file, and runs the GWB_MSPA command to generate structural connectivity maps for each year.

Code name:

File: MSPA.txt

Description: This script describes the installation of the system dependencies required to run the MSPA (Morphological Spatial Pattern Analysis) tool from the GuidosToolbox Workbench on Linux. It outlines the necessary directory structure for organizing input and output GeoTIFF files for 2019 and 2023, as well as the placement of the MSPA parameter file. Finally, it provides the command used to execute the MSPA analysis for each dataset.

File: MSPA_postproces.R

**Description: **This script processes MSPA outputs for 2019 and 2023 to evaluate changes in forest structural connectivity. It reclassifies the MSPA rasters into standardized landscape categories, masks them with the forest extent, calculates pixel frequencies and percentages for each class, and exports both the reclassified rasters and a summary table comparing MSPA class distributions between years.

File: Datatype_clasificacion.R

Description: Post-processing R code for optimizing data types to reduce the size of files exported by GEE

Resistance surface

The resistance surface was constructed based on the theoretical framework of the Global Biodiversity Model, with data weighted to represent the influence of human activities on ecosystems (Alkemade et al., 2009). The variables used to construct the resistance layer included the impact of vegetation on biodiversity (derived from our land cover classification), proximity to roads, distances between habitat patches, and the size of those patches. The following codes were used to estimate each variable and the combine to estimate the resistance layer.

File: Distancia_Carreteras.R

Description: This script extracts forest patches from land-cover maps for 2019 and 2023, computes the Euclidean distance from each pixel to the nearest forest patch, and masks the results to the study area. The resulting distance rasters are then reclassified into distance-based impact weights using predefined distance thresholds. These layers represent the effect of forest isolation on habitat condition and connectivity.

File: Distancia_Parches.R

Description: This script identifies forest patches and calculates the Euclidean distance from each pixel to the nearest patch for both 2019 and 2023. The distance rasters are then masked to the study area and reclassified into distance-based impact weights representing the effect of isolation on habitat connectivity.

File: Impacto_Vegetacion.R

Description: This script reclassifies categorical land-cover maps from 2019 and 2023 into continuous vegetation impact values using a predefined reclassification matrix. The resulting rasters represent the relative impact of different land-cover types on habitat condition and are used as inputs for subsequent resistance modeling.

File: Tamaño_Parches.R

Description: This script quantifies the impact of forest patch size on habitat condition. For 2019, patch areas are calculated from polygonized forest patches and assigned impact values based on size classes. For 2023, WhiteboxTools is used to delineate patches and compute pixel-based patch areas, which are then reclassified into size-dependent impact values.

File: Resistencia.R

Description: This script integrates multiple spatial components—land use, infrastructure proximity, distance to forest patches, and patch size impact—by multiplying them to generate resistance surfaces for 2019 and 2023. The resistance maps are subsequently rescaled to a standardized 1–100 range for use in connectivity and circuit-theory analyses.

References

Alkemade R., van Oorschot M., Miles L., Nellemann C., Bakkenes M., ten Brink B. (2009). GLOBIO3: A Framework to Investigate Options for Reducing Global Terrestrial Biodiversity Loss. Ecosystems, 12(3), 374-390. https://doi.org/10.1007/s10021-009-9229-5

Núñez R (2023) Proyecto jaguar: Fortalecimiento del monitoreo de jaguar en corredores críticos del Pacífico Central mexicano.

 

Files and variables

Variables needed (shapefile):

aio.shp = study area (Nuñez 2023). For additional information regarding this shapefile please contact: Dr. Rodrigo Nuñez at proyectojaguar@gmail.com

sample_points.zip = training data