Next Article in Journal
Dynamics of Native Forests and Exotic Tree Plantations in Southern Chile
Previous Article in Journal
Research on Regional Spatial Structure Based on the Spatiotemporal Correlation Analysis of Population Migration: A Case Study of Hubei, China
Previous Article in Special Issue
Regionalization of the Croatian Landscape: An Integrative Approach to Methods and Criteria for Defining Boundaries
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Technical Note

PyLM: A Python Implementation for Landscape Mosaic Analysis

by
Gregory Giuliani
1,2
1
Living Earth Lab-EnviroSPACE, Institute for Environmental Sciences, University of Geneva, Bd. Carl-Vogt 66, 1205 Geneva, Switzerland
2
GRID-Geneva, Institute for Environmental Sciences, University of Geneva, Bd. Carl-Vogt 66, 1205 Geneva, Switzerland
Land 2026, 15(1), 187; https://doi.org/10.3390/land15010187
Submission received: 11 December 2025 / Revised: 14 January 2026 / Accepted: 19 January 2026 / Published: 20 January 2026

Abstract

Landscape ecology is the study of how different land uses and natural areas are arranged across a region, and how these spatial patterns affect biodiversity, ecosystem health, and human impacts. To measure and track these patterns, ecologists are using a range of tools and metrics that capture features such as connectivity, fragmentation, and the balance between natural and developed land. One such method is the Landscape Mosaic (LM) approach which classifies land into categories based on the mix of agriculture, natural habitats, and developed areas (e.g., urban), providing an integrated view of how humans are influencing ecosystems. Until recently, LM was only available through a specialized software package (i.e., GuidosToolbox), which limits its flexibility, interaction with other tools, and integration in scientific workflows. To address this, we present PyLM, a Python-based implementation of the LM model, making it easier for researchers, planners, and conservationists to analyze land use/cover (LUC) maps, generate statistics, and embed results into broader environmental workflows. The applicability of PyLM is demonstrated through a use case based on a LUC dataset for Switzerland. This new implementation enhances accessibility, supports sustainability assessments, and strengthens the ability to monitor landscapes over time.

1. Introduction

Landscapes are defined as mosaics of different land cover, land use, habitats, and ecosystems. Landscape ecology is a field of ecology that specifically examines the spatial patterns of ecosystems and the processes that shape them across heterogeneous environments [1]. It emphasizes the relationships between spatial configuration (e.g., size, shape, distribution) and ecological dynamics including species’ movement, biodiversity, and ecosystem functioning [2]. To quantify these spatial patterns, a variety of metrics are available to account for characteristics such as patch area, diversity, density, connectivity and fragmentation [1,3,4]. These metrics serve as essential tools for conservation planning, habitat management, and sustainability research by providing a standardized way to analyze landscape structure, detect changes over time, and assess the impacts of natural disturbances or human activities, like urbanization, agriculture, and deforestation [5].
To identify and assess spatial patterns, different methods are available to help monitor the evolution of landscapes and link them to specific ecological processes [6]. The Landscape Mosaic (LM) approach provides a framework for quantifying spatial heterogeneity through a tri-polar classification scheme, meaning that landscapes are classified based on their position along three dominant land use/cover (LUC) classes (i.e., Agriculture, Natural, and Developed) according to their relative abundance within a surrounding neighborhood [2]. The method applies a moving window to quantify the relative proportions of the three classes within each focal grid cell. These proportions are subsequently assigned to 1 of 103 classes and aggregated into 19 mosaic categories, determined by threshold criteria that capture the dominance, presence, or absence of each class. The LM approach is designed to characterize the spatial juxtaposition of anthropogenic (i.e., developed and agricultural areas) relative to natural land covers. By simultaneously evaluating these three dominant land cover types, the approach captures landscape composition, connectivity, and heterogeneity, thereby providing an integrated measure of human influence on landscapes. The indicator assigns each location to a category based on the relative proportions of Agriculture, Natural, and Developed land within its surrounding neighborhood [2,7]. This classification supports the quantification and spatial assessment of landscape capacities to sustainably supply ecosystem services [8]. The Landscape Mosaic provides a framework for assessing the state, pressures, and temporal dynamics of landscapes, including the intensity of land use across agricultural, urban, and natural ecosystems, as well as their complex interactions under changing environmental and socioeconomic conditions [7,9].
Based on a comprehensive search of both the literature and online repositories, we found that the LM approach is currently implemented only in the GuidosToolbox (Graphical User Interface for the Description of Image Objects and Their Shapes, GTB), with no evidence of alternative implementations in Python, Java, or any other programming languages, as well as common geospatial software such as R, ArcGIS, or GRASS GIS [10]. GTB is free and open-source software with a set of customized and thematically grouped raster image processing routines mostly used in environmental, ecological, forestry, land cover/land use, and landscape ecology contexts. It is available through a desktop application, for Windows, Mac, and Linux, as well as a command-line Linux server application for mass processing (GuidosToolbox Workbench GWB). Despite the fact that the LM model is available as a single tool within GTB/GWB, its interaction with other software/models is limited; therefore, there is a need for a version that could be available (1) as a standalone tool, (2) that could be executed both on a desktop computer or a server, (3) that could be easily embedded in processing chains/workflows or integrated in other analytical framework like LivingEarth [11], (4) or based on common data science programming language such as Python.
Although the LM approach could be implemented within established GIS platforms, such as ArcGIS or GRASS GIS, the present work prioritizes a Python implementation in a Jupyter Notebook environment to better support methodological transparency, flexibility, and reproducibility. Jupyter Notebooks allow the entire analytical workflow, from data preparation and parameterization to execution, visualization, and interpretation, to be explicitly documented and interactively explored in a single, self-contained framework. This data science-oriented approach facilitates systematic analyses across various scales and parameters, seamless integration with scientific Python libraries, and reproducible research practices that are more difficult to achieve in tightly coupled GIS environments. As a result, the Jupyter-based implementation is particularly well-suited for methodological development and experimentation, while remaining complementary to future integrations into operational GIS platforms.
Following these considerations, PyLM provides a Python implementation of the Landscape Mosaic model that enables users to process any land cover map and generate the different stratification layers as well as any relevant statistics (e.g., class frequency distribution). PyLM offers increased accessibility, flexibility, and computational power for landscape ecology, allowing for easier analysis, customization, and integration with other open-source tools for research, conservation, and planning. PyLM could be executed either as a standalone Python script, within a Jupyter Notebook 7.5 environment, and ultimately could be easily embedded in any processing workflow. Overall, PyLM simplifies the production of key landscape metrics necessary for environmental monitoring. The remainder of the paper is organized as follows: Section 2 describes the Landscape Mosaic classification framework and details its implementation as a Python-based tool; Section 3 evaluates the implementation using a LUC map of Switzerland and compares the results with those produced with GTB; and finally, Section 4 discusses the main benefits and limitations of the proposed approach, concluding with a synthesis of the main findings and directions for future research.

2. Materials and Methods

2.1. LM Classification Framework

The Landscape Mosaic (LM) is a tri-polar classification framework that characterizes each spatial location by the relative contributions of three dominant land cover types: Agriculture, Natural, and Developed. This framework quantifies anthropogenic influence, represented by agricultural and developed (i.e., urban) land cover classes, in relation to natural landscapes following earlier methodological developments [2,6,8,10]. The classification scheme separates a triangular domain into 19 mosaic classes using threshold values of 10%, 60%, and 100%, which indicate the presence, dominance, or uniqueness of each land cover class. Mosaic class labels encode the proportional contribution of each cover class: lower-case letters (a, n, and d) indicate presence (≥10% and <60%), upper-case letters (A, N, and D) indicate dominance (≥60% and <100%), and exclusive composition (100%) is represented by the corner classes AA, NN, and DD. This notation distinguishes Dominance (upper-case), Interface Zones (mixed upper- and lower-case), and Mixture classes (lower-case only), while mosaic colors correspond to proportional intensities of blue (Agriculture), green (Natural), and red (Developed) [7,8,9].
Each pixel in an LM map carries a triplet of proportional values for the three land cover types and can therefore be uniquely positioned within the triangular classification space. The 19 mosaic classes are derived from color-coded subsections of this triangle, as shown in the LM legend, and represent specific combinations of presence, dominance, and uniqueness [9]. To facilitate computational efficiency and interpretability, pixel distributions are aggregated into 100 sub-triangles defined by 10% intervals along each axis, supplemented by three additional classes corresponding to the pure land cover corners, yielding 103 total occurrence classes [7]. Mapping each pixel into this discretized triangular space produces a heatmap (point-cloud distribution), where the frequency of pixel occurrence reflects the prevalence of specific landscape compositions. Empty sub-spaces indicate unrepresented combinations, while the most frequent combinations are highlighted with a black background [8].
In terms of input, the only required data is a LUC map that should be reclassified to no more than the three target classes, encoded as follows: 1 (Agriculture), 2 (Natural), and 3 (Developed). In addition, a class value of 0 could be included to mask pixels representing missing or no-data values (Figure 1). Once the LM analysis is completed, the outputs are as follows: (1) a single three-band raster layer representing the proportion on a per-pixel basis of the 3 classes; (2) a raster layer showing all 103 mosaic classes; (3) an aggregated raster layer at 19 classes; (4) the six stratification layers (i.e., background, agriculture, developed, natural, anthropic intensity, and diversity); and (5) a comma-separated value (CSV) file showing the occurrence values (i.e., class frequency distribution) (Figure 2).

2.2. Implementation

To implement the general processing workflow of the LM model (Figure 1), we used Python as the programming language through Jupyter Notebook [12]. This choice was made because Python is a widely used language in the geospatial community and Jupyter Notebook allows for the combination of executable code cells with narrative text to iteratively write, run, and refine the model, offering benefits such as interactive development, immediate visualization of results, transparent documentation of analytical steps, and an intuitive environment for experimentation and reproducibility [13].
All the code and documentation are available at: https://github.com/ggiuliani/PyLM (accessed on 17 October 2025). The package requires Python 3.10 or its later versions and JupyterLab (server or desktop) to be installed prior to executing PyLM. It also requires the following packages: rasterio, numpy, scipy, matplotlib, and csv. These dependencies are automatically verified (and installed) within the initialization module. Once the release has been downloaded and the zip file extracted, users can edit the Python file (or the Jupyter Notebook file) to define the input (i.e., where the input LUC map in geotiff format is stored—inputFolder) and output (i.e., where all produced layers will be stored—outputFolder) folders. In addition, users can also edit the filename of the LUC map in the l3 variable. Users can then simply execute the command python PyLM.py and all layers are available in the output folder once processed. Alternatively, users can execute the Jupyter Notebook provided in the release.
The implemented analytical workflow follows a linear architecture, in which the output of each module constitutes the input for the subsequent module. Hereafter, we present the main modules and their respective tasks and output files:
  • Initialization: This module first tests if the necessary libraries are installed before users can then define both input and output folders.
  • Input data: Users are required to use any LUC map as an input raster map that will be subsequently reclassified (in the module Map conversion) into the 3 target classes A-N-D (1 Byte—Agriculture, 2 Byte—Natural, 3 Byte—Developed), plus an optional class value of 0 Byte which is reserved for masking missing/no-data pixels.
  • Map conversion: Depending on the LUC used, this module allows the flexibility to reclassify any LUC map to the 3-class raster map required by the LM model. The output file is: l3_reclass.tif.
    LM Analysis: This is the main module that first computes the proportion of A-N-D per pixel, then produces the 103 classes and regroups them into the 19 classes [7], and finally generates all the stratification layers.
  • Moving window—103 classes–19 classes: This sub-module computes the proportion of A-N-D classes on a per-pixel basis using a moving window of 10 × 10 pixels (output: lmCount.tif), further computes the 103 classes (output: lm103class.tif), and then aggregates them into the 19 classes (output: lm19class.tif).
  • LM Background: This summarizes the LM into the 4 classes of Natural, Agriculture, Developed, and Mixed, showing the dominant presence of each LUC class (output: lmBackground.tif).
  • LM Diversity: This summarizes the LM into 4 classes to account for the increasing degree of LUC diversity from Uniform, Dual, Triple, to Intermixed LUC, reporting on the degree of spatial heterogeneity (output: lmDiversity.tif).
  • LM Agriculture: This summarizes the LM into 3 classes showing where agricultural LUC is dominant (≥60%), subdominant, or minor (<10%), thereby enabling the determination of the anthropogenic impact from agriculture (output: lmAgriculture.tif).
  • LM Natural: This summarizes the LM into 3 classes showing where natural LUC is dominant (≥60%), subdominant, or minor (<10%), allowing users to determine the dominant natural classes not impacted by anthropogenic activities (output: lmNatural.tif).
  • LM Developed: This summarizes the LM into 3 classes showing where developed LUC is dominant (≥60%), subdominant, or minor (<10%), allowing users to determine the anthropogenic impact from urbanization (output: lmDeveloped.tif).
  • LM Anthropic intensity: This summarizes the anthropic intensity into 6 classes from Very Low, Low, Medium, High, Very High, to Extreme, accounting for the anthropogenic impacts from agriculture and urbanization (output: lmAnthropicIntensity.tif).
  • Class frequency distribution: This summarizes the statistics for the frequency distribution of the 103 classes within the ternary diagram (output: heatmap.csv).
In addition, in the output folder, all raster layers have a colorized version which follow the color scheme defined in [7,8,9]. They are identified with _rgb in the file name.

3. Results

Hereafter, we present some of the relevant outputs with the application of PyLM based on land cover maps of Switzerland.

3.1. PyLM Analysis at 10 m Resolution of Switzerland

As part of the effort to build a Digital Twin of the Environment [14,15], land cover maps at 10 m resolution using Sentinel-2 data were produced using the Swiss Data Cube [16,17] together with Living Earth [11,18] and SITS [19,20]. We executed PyLM using the 8-class FAO Land Cover Classification System (LCCS) compliant land cover map of Switzerland from 2018 (Table 1), processing approximately 410 million pixels in less than 10 min on a single laptop computer.
It produced the 19 classes of Landscape Mosaic (Figure 3) together with the different stratification layers (Figure 4).
The tabular output (i.e., statistics) of the pixel occurrence frequency of the map in Figure 3 shows that the Swiss landscape is dominated by natural classes, whereas agriculture classes have had a larger anthropogenic impact than other developed areas (Figure 5). Because the occurrence frequencies are expressed as percentages, the class frequency distribution provides a scale-independent basis for: (1) comparing landscape composition across images of differing spatial extent; (2) analyzing temporal sequences at a consistent observational scale; and (3) assessing changes in land cover prevalence across multiple spatial scales.

3.2. Comparison with GTB Output

To validate that the model has been adequately implemented and is producing results that are similar to those provided by the reference implementation (i.e., GTB), we used the same land cover map as before and executed the same analysis as in the previous section using the Landscape Mosaic module of GTB [10]. The 19-class map (Figure 6) looks very similar visually to the output of PyLM, indicating that the PyLM version has been properly implemented. This observation has been reinforced by computing the difference between the two 19-class raster outputs (i.e., PyLM–GTB) and validating that less than 0.2% of the pixels are different between the two implementations. This difference is probably due to different approaches in computing the class proportions close to the borders (e.g., a moving window that has no data).

3.3. Comparison with the Reference Land Cover Map of Switzerland

To better understand the effect of spatial resolution on the landscape metrics produced with PyLM, we compared the previously obtained 19-class LM map at 10 m resolution with the official land cover map, known as the ArealStatistik, produced by the Federal Statistical Office (FSO) every 6 years at 100 m spatial resolution [21,22]. Interestingly, the general patterns of the landscape are similar, but the 10 m resolution version is providing finer details, especially with mixed classes (e.g., Ad, An, Na, Nd, Da, and Dn) (Figure 7). This could potentially be useful for identifying more subtle changes in the natural/anthropic interface.
This highlights the importance of carefully considering the spatial scale of analysis, (as well as spatial resolution and neighborhood size) as it strongly influences LM analysis because classes and metrics are derived from the relative proportions of LUC classes within a moving window. At finer spatial resolutions, small and heterogeneous patches are preserved, leading to an increased mixed of mosaic classes, higher variability in LM metrics, and a stronger expression of local heterogeneity. In contrast, at coarser resolutions or with larger neighborhoods, spatial detail becomes smoothed, dominant LUC classes prevail, mixed mosaics are reduced, and LM metrics tend to indicate greater homogeneity and aggregation. Consequently, LM metrics are scale-dependent, and changes in resolution or analysis window can alter both the magnitude and spatial patterns of mosaic classes, affecting cross-study comparisons and interpretation unless scale is explicitly considered or standardized.

3.4. Different Time Periods

Finally, we tested PyLM on different time periods of the Switzerland’s Land Use Statistics, ArealStatistik, provided by the Federal Office for Statistics (i.e., 1979–1985, 1992–1997, 2004–2009, and 2013–2018): https://www.bfs.admin.ch/bfs/en/home/services/geostat/swiss-federal-statistics-geodata/land-use-cover-suitability/swiss-land-use-statistics.html (accessed on 17 October 2025) to see how the dominant LM classes (Figure 8) and the anthropic intensity evolved over time (Figure 9).
These initial results show that agriculture has slightly decreased over the last four decades at the expense of developed and mixed classes, indicating that urbanization is gaining ground compared to the other classes and that the landscape is also becoming more fragmented (e.g., increase in mixed class). This observation is confirmed by the increase in proportion of the “Very High” and “Extreme” classes of the anthropic intensity.

4. Discussion

The aim of this technical note was to present the Python-based implementation of the Landscape Mosaic model using some examples based on Swiss land cover maps. These findings suggest that the implementation of the LM approach is satisfactory, as it produces similar results to the reference software. The results demonstrate that the capability of PyLM enables users to process any LUC map to derive their stratification layers and associated summaries of statistics. In this context, PyLM enhances accessibility, flexibility, and computational efficiency for landscape ecological analyses, facilitating data processing, customization, and integration with other open-source tools used in research, conservation, and planning. The tool can be deployed as a standalone Python script, within a Jupyter Notebook environment, or seamlessly embedded into broader analytical workflows. Together, these features streamline the production of essential landscape metrics and provide a practical foundation for different types of environmental analysis and accounting [5].
In particular, the availability of a Python-based implementation of the LM approach could enable straightforward integration into existing GIS and geospatial analysis workflows. Python is natively supported and extensible in widely used GIS platforms such as QGIS, ArcGIS Pro, and GRASS GIS; therefore, the code of PyLM could be potentially incorporated as a custom processing tool or script, allowing users to apply LM analysis directly to raster LUC datasets within their favorite GIS environments. In addition, the Python implementation facilitates interoperability with scientific computing libraries (e.g., NumPy, SciPy, rasterio, and xarray) and workflow management systems, supporting automated, reproducible, and scalable analyses, including batch processing and integration into model chains. This flexibility also enables the coupling of LM outputs with downstream spatial statistics, landscape metrics, or machine-learning frameworks, thereby broadening the applicability of the Landscape Mosaic approach across research, planning, and decision-making contexts.
Beyond integration with existing GIS platforms, a Python-based LM approach offers several additional benefits that enhance its scientific and practical value. Open and transparent source code improves reproducibility and methodological scrutiny, allowing users to inspect, validate, and adapt the implementation to specific research questions or data characteristics. The flexibility of Python also facilitates rapid methodological extensions, such as experimenting with alternative neighborhood definitions, scale parameters, or classification thresholds, and supports high-performance computing through parallelization and cloud-based processing for large-area or high-resolution datasets. Furthermore, the broad adoption of Python in the geospatial and data science communities lowers barriers to use, promotes community-driven development, and encourages integration with open-data ecosystems, thereby increasing the accessibility, extensibility, and long-term sustainability of the Landscape Mosaic framework.
While the LM approach could, in principle, be further developed within GTB, the motivation for introducing a Python-based implementation lies in complementing, rather than replacing, this mature and well-established software. GTB is primarily designed for interactive Graphical User Interface (GUI)-driven analyses, whereas a Python implementation enables transparent, scriptable, and fully reproducible workflows that are better aligned with current data science practices. Implementing LM in Python facilitates capabilities that are difficult to achieve within a GUI-centered architecture, such as automation; systematic sensitivity and scale analyses; integration with statistical and machine-learning frameworks; and execution in high-performance or cloud-based environments. Moreover, by relying on widely adopted open-source Python libraries, the approach supports long-term sustainability, community-driven development, and interoperability. In this context, the Python implementation promotes open science and Findable-Accessible-Interoperable-Reusable (FAIR) principles [23,24] by making the methodology explicitly accessible, reusable, and adaptable across platforms, while remaining complementary to GTB and potentially serving as a modular foundation for future integration into existing GIS or toolbox-based environments.
Despite its broad applicability and benefits as previously mentioned, the LM approach is subject to several limitations that should be considered when interpreting these results. The method is inherently sensitive to the quality, spatial resolution, and classification accuracy in the underlying LUC data [25,26]; errors or inconsistencies in these inputs can propagate through the different outputs of the model and ultimately influence the identification of structural classes [7,8]. Because the approach relies on only three broad classes, it may oversimplify complex ecological gradients and processes, particularly in heterogeneous or transitional environments where boundaries are diffused [27,28]. Furthermore, while the LM approach captures structural patterns, it does not directly incorporate ecological processes (e.g., habitats), which could limit its ability to fully represent ecosystem dynamics without the use of additional complementary data [29]. Temporal analyses may also be challenging when input LUC data differ in methodology or classification schemes, making it difficult to disentangle methodological issues from real landscape change [30]. Finally, while this approach is computationally efficient, its usefulness for decision-making depends on how it integrates socioeconomic, ecological, and management information, an aspect that remains underdeveloped and may significantly influence the direct translation of structural patterns into actionable policy or conservation strategies [31,32,33].
The LM approach supports environmental monitoring by characterizing changes in habitat structure and configuration across space and time. In the European Commission (EC)-funded LandShift project (https://landshift.eu), PyLM allows for the classification of landscapes into its structural components, enables the detection of fragmentation, connectivity shifts, and landscape degradation, and supports biodiversity assessments, ecosystem condition reporting, and land use planning, including the identification of conservation or restoration priorities [34]. Finally, in the Swiss National Science Foundation that funded the DynamicLand project, PyLM could be applied to a time-series of LUC data to facilitate the evaluation of long-term trends driven by climate pressures, natural disturbances, or human expansion [35,36,37]. Overall, LM provides a robust and reproducible framework for interpreting the ecological implications of land cover change and possibly informing the development of monitoring strategies from local to national levels [8,38].
Given the increasing global relevance of land degradation [39,40,41,42,43], a core research interest is the potential benefits the LM approach has with degradation assessments based on indicators such as SDG 15.3.1 [44,45,46] and MEDALUS/ESAI [47,48,49]. In the EC-funded MONALISA project (https://monalisa4land.eu), PyLM could be used to link Landscape Mosaic structures with these indicators to improve understanding in how natural- and human-driven processes interact across heterogeneous landscapes, and help identify highly degraded patches where intervention is the most urgent. The analysis of patch interconnections may further reveal how degradation propagates spatially, enhancing the ability to anticipate cascading effects. As mosaics respond to both abrupt disturbances and gradual pressures, incorporating temporal dynamics is also critical in order to support adaptive management and early-warning systems. Assessing how degradation within structural classes affects ecosystem service provision can also guide restoration toward areas of greatest functional loss. Finally, integrating socioeconomic and human activity data with LM-based assessments can help identify context-specific drivers and inform more effective and sustainable land management strategies [50,51,52].

Funding

This research was funded by European Union ‘Horizon Europe Program’, grant number 101182007 (LandShift); grant number 101157867 (MONALISA); as well as the Swiss National Science Foundation that funded the DynamicLand (Grant no. 221323) project.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request. The code of PyLM is openly and freely available at: https://github.com/ggiuliani/PyLM (accessed on 17 October 2025).

Acknowledgments

The author would like to acknowledge the European Union ‘Horizon Europe Program’ that funded the LandShift (Grant Agreement no. 101182007) and the MONALISA (Grant Agreement no. 101157867) projects as well as the Swiss National Science Foundation that funded the DynamicLand project (Grant no. 221323) for their respective support. The author acknowledges contributions from Lucie Schlumpf and Carole Planque for their help in testing the package. Their input and feedback were essential in identifying and resolving technical issues, ensuring the accuracy and reliability of the results.

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. Hesselbarth, M.H.K.; Nowosad, J.; de Flamingh, A.; Simpkins, C.E.; Jung, M.; Gerber, G.; Bosch, M. Computational Methods in Landscape Ecology. Curr. Landsc. Ecol. Rep. 2024, 10, 2. [Google Scholar] [CrossRef]
  2. Riitters, K.H.; Wickham, J.D.; Wade, T.G. An Indicator of Forest Dynamics Using a Shifting Landscape Mosaic. Ecol. Indic. 2009, 9, 107–117. [Google Scholar] [CrossRef]
  3. Etherington, T.R.; Holland, E.P.; O’Sullivan, D. NLMpy: A Python Software Package for the Creation of Neutral Landscape Models within a General Numerical Framework. Methods Ecol. Evol. 2015, 6, 164–168. [Google Scholar] [CrossRef]
  4. Bosch, M. PyLandStats: An Open-Source Pythonic Library to Compute Landscape Metrics. PLoS ONE 2019, 14, e0225734. [Google Scholar] [CrossRef]
  5. Frazier, A.E.; Kedron, P. Landscape Metrics: Past Progress and Future Directions. Curr. Landsc. Ecol. Rep. 2017, 2, 63–72. [Google Scholar] [CrossRef]
  6. Riitters, K.; Schleeweis, K.; Costanza, J. Forest Area Change in the Shifting Landscape Mosaic of the Continental United States from 2001 to 2016. Land 2020, 9, 417. [Google Scholar] [CrossRef]
  7. Vogt, P.; Wickham, J.; Barredo, J.I.; Riitters, K. Revisiting the Landscape Mosaic Model. PLoS ONE 2024, 19, e0304215. [Google Scholar] [CrossRef]
  8. Maes, J.; Teller, A.; Erhard, M.; Conde, S.; Vallecillo, R.S.; Barredo, C.J.I.; Paracchini, M.-L.; Abdul, M.D.; Trombetti, M.; Vigiak, O.; et al. Mapping and Assessment of Ecosystems and Their Services: An EU Ecosystem Assessment. Available online: https://publications.jrc.ec.europa.eu/repository/handle/JRC120383 (accessed on 19 November 2024).
  9. European Commission, Joint Research Centre. The Landscape Mosaic (GuidosToolbox Pattern-LM); Directorate-General Joint Research Centre, Bio-Economy Unit: Ispra, Italy, 2024; Available online: https://ies-ows.jrc.ec.europa.eu/gtb/GTB/psheets/GTB-Pattern-LM.pdf (accessed on 14 November 2025).
  10. Vogt, P.; Riitters, K. GuidosToolbox: Universal Digital Image Object Analysis. Eur. J. Remote Sens. 2017, 50, 352–361. [Google Scholar] [CrossRef]
  11. Owers, C.J.; Lucas, R.M.; Clewley, D.; Planque, C.; Punalekar, S.; Tissott, B.; Chua, S.M.T.; Bunting, P.; Mueller, N.; Metternicht, G. Living Earth: Implementing National Standardised Land Cover Classification Systems for Earth Observation in Support of Sustainable Development. Big Earth Data 2021, 5, 368–390. [Google Scholar] [CrossRef]
  12. Perkel, J.M. Why Jupyter Is Data Scientists’ Computational Notebook of Choice. Nature 2018, 563, 145–146. [Google Scholar] [CrossRef]
  13. Wagemann, J.; Fierli, F.; Mantovani, S.; Siemen, S.; Seeger, B.; Bendix, J. Five Guiding Principles to Make Jupyter Notebooks Fit for Earth Observation Data Education. Remote Sens. 2022, 14, 3359. [Google Scholar] [CrossRef]
  14. Kussul, N.; Giuliani, G.; Shelestov, A.; Drozd, S.; Kolotii, A.; Salii, Y.; Cherniatevych, A.; Yavorskyi, O.; Malyniak, V.; Poussin, C. Digital Twins for Land Use Change. In System Analysis and Data Mining; Zgurovsky, M., Pankratova, N., Eds.; Springer Nature: Switzerland, Cham, 2026; pp. 371–389. ISBN 978-3-031-97529-5. [Google Scholar]
  15. Kussul, N.; Giuliani, G.; Shelestov, A.; Cherniatevych, A.; Drozd, S.; Kolotii, A.; Salii, Y.; Yavorskyi, O.; Malyniak, V.; Lavreniuk, A.; et al. AI-Powered Digital Twin Framework for Land Use Change in Disaster Affected Regions. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2025, 18, 27473–27492. [Google Scholar] [CrossRef]
  16. Chatenoux, B.; Richard, J.-P.; Small, D.; Roeoesli, C.; Wingate, V.; Poussin, C.; Rodila, D.; Peduzzi, P.; Steinmeier, C.; Ginzler, C.; et al. The Swiss Data Cube, Analysis Ready Data Archive Using Earth Observations of Switzerland. Sci. Data 2021, 8, 295. [Google Scholar] [CrossRef]
  17. Giuliani, G.; Chatenoux, B.; Bono, A.D.; Rodila, D.; Richard, J.-P.; Allenbach, K.; Dao, H.; Peduzzi, P. Building an Earth Observations Data Cube: Lessons Learned from the Swiss Data Cube (SDC) on Generating Analysis Ready Data (ARD). Big Earth Data 2017, 1, 100–117. [Google Scholar] [CrossRef]
  18. Planque, C.; Punalekar, S.; Lucas, R.; Chognard, S.; Owers, C.J.; Clewley, D.; Bunting, P.; Sykes, H.; Horton, C. Living Wales: Automatic and Routine Environmental Monitoring Using Multi-Source Earth Observation Data. In Proceedings of the Earth Resources and Environmental Remote Sensing/GIS Applications XI, Online, 21–25 September 2020; International Society for Optics and Photonics: San Diego, CA, USA, 2020; Volume 11534, p. 115340C. [Google Scholar]
  19. Simoes, R.; Camara, G.; Queiroz, G.; Souza, F.; Andrade, P.R.; Santos, L.; Carvalho, A.; Ferreira, K. Satellite Image Time Series Analysis for Big Earth Observation Data. Remote Sens. 2021, 13, 2428. [Google Scholar] [CrossRef]
  20. Giuliani, G. Time-First Approach for Land Cover Mapping Using Big Earth Observation Data Time-Series in a Data Cube—A Case Study from the Lake Geneva Region (Switzerland). Big Earth Data 2024, 8, 435–466. [Google Scholar] [CrossRef]
  21. Swiss Federal Statistical Office. Land Use in Switzerland—Results of the Swiss Land Use Statistics; SFO: Neuchâtel, Switzerland, 2013. [Google Scholar]
  22. Giuliani, G.; Rodila, D.; Külling, N.; Maggini, R.; Lehmann, A. Downscaling Switzerland Land Use/Land Cover Data Using Nearest Neighbors and an Expert System. Land 2022, 11, 615. [Google Scholar] [CrossRef]
  23. Wilkinson, M.D.; Dumontier, M.; Aalbersberg, I.J.; Appleton, G.; Axton, M.; Baak, A.; Blomberg, N.; Boiten, J.-W.; da Silva Santos, L.B.; Bourne, P.E.; et al. The FAIR Guiding Principles for Scientific Data Management and Stewardship. Sci. Data 2016, 3, 160018. [Google Scholar] [CrossRef]
  24. Barker, M.; Chue Hong, N.P.; Katz, D.S.; Lamprecht, A.-L.; Martinez-Ortiz, C.; Psomopoulos, F.; Harrow, J.; Castro, L.J.; Gruenpeter, M.; Martinez, P.A.; et al. Introducing the FAIR Principles for Research Software. Sci. Data 2022, 9, 622. [Google Scholar] [CrossRef]
  25. Bratic, G.; Oxoli, D.; Brovelli, M.A. Map of Land Cover Agreement: Ensambling Existing Datasets for Large-Scale Training Data Provision. Remote Sens. 2023, 15, 3774. [Google Scholar] [CrossRef]
  26. Valle, D.; Izbicki, R.; Leite, R.V. Quantifying Uncertainty in Land-Use Land-Cover Classification Using Conformal Statistics. Remote Sens. Environ. 2023, 295, 113682. [Google Scholar] [CrossRef]
  27. Gatis, N.; Carless, D.; Luscombe, D.J.; Brazier, R.E.; Anderson, K. An Operational Land Cover and Land Cover Change Toolbox: Processing Open-Source Data with Open-Source Software. Ecol. Solut. Evid. 2022, 3, e12162. [Google Scholar] [CrossRef]
  28. Comber, A.; Wulder, M. Considering Spatiotemporal Processes in Big Data Analysis: Insights from Remote Sensing of Land Cover and Land Use. Trans. GIS 2019, 23, 879–891. [Google Scholar] [CrossRef]
  29. Senf, C. Seeing the System from Above: The Use and Potential of Remote Sensing for Studying Ecosystem Dynamics. Ecosystems 2022, 25, 1719–1737. [Google Scholar] [CrossRef]
  30. Myers, D.T.; Jones, D.; Oviedo-Vargas, D.; Schmit, J.P.; Ficklin, D.L.; Zhang, X. Seasonal Variation in Landcover Estimates Reveals Sensitivities and Opportunities for Environmental Models. EGUsphere 2023, 28, 5295–5310. [Google Scholar] [CrossRef]
  31. Berger, K.; Foerster, S.; Szantoi, Z.; Hostert, P.; Foerster, M.; Van De Kerchove, R.; Vancutsem, C.; Schweitzer, C.; Masolele, R.; Reiche, J.; et al. Evolving Earth Observation Capabilities for Recent Land-Related EU Policies. Land Use Policy 2025, 158, 107749. [Google Scholar] [CrossRef]
  32. Hersperger, A.M.; Bürgi, M. Going beyond Landscape Change Description: Quantifying the Importance of Driving Forces of Landscape Change in a Central Europe Case Study. Land Use Policy 2009, 26, 640–648. [Google Scholar] [CrossRef]
  33. Szantoi, Z.; Geller, G.N.; Tsendbazar, N.-E.; See, L.; Griffiths, P.; Fritz, S.; Gong, P.; Herold, M.; Mora, B.; Obregón, A. Addressing the Need for Improved Land Cover Map Products for Policy Support. Environ. Sci. Policy 2020, 112, 28–35. [Google Scholar] [CrossRef]
  34. UNCCD. Global Land Outlook: Land Restoration for Recovery and Resilience; UNCCD: Bonn, Germany, 2022; p. 204. [Google Scholar]
  35. Lambin, E.F.; Turner, B.L.; Geist, H.J.; Agbola, S.B.; Angelsen, A.; Bruce, J.W.; Coomes, O.T.; Dirzo, R.; Fischer, G.; Folke, C.; et al. The Causes of Land-Use and Land-Cover Change: Moving beyond the Myths. Glob. Environ. Change 2001, 11, 261–269. [Google Scholar] [CrossRef]
  36. Hoffmann, P.; Reinhart, V.; Rechid, D.; de Noblet-Ducoudré, N.; Davin, E.L.; Asmus, C.; Bechtel, B.; Böhner, J.; Katragkou, E.; Luyssaert, S. High-Resolution Land Use and Land Cover Dataset for Regional Climate Modelling: Historical and Future Changes in Europe. Earth Syst. Sci. Data 2023, 15, 3819–3852. [Google Scholar] [CrossRef]
  37. Manakos, I.; Gutman, G.; Kalaitzidis, C. Monitoring Land Cover Change: Towards Sustainability. Land 2021, 10, 1356. [Google Scholar] [CrossRef]
  38. Edens, B.; Maes, J.; Hein, L.; Obst, C.; Siikamaki, J.; Schenau, S.; Javorsek, M.; Chow, J.; Chan, J.Y.; Steurer, A.; et al. Establishing the SEEA Ecosystem Accounting as a Global Standard. Ecosyst. Serv. 2022, 54, 101413. [Google Scholar] [CrossRef]
  39. Barbier, E.B.; Hochard, J.P. Land Degradation and Poverty. Nat. Sustain. 2018, 1, 623–631. [Google Scholar] [CrossRef]
  40. Bai, Z.; Dent, D.; Wu, Y.; de Jong, R. Land Degradation and Ecosystem Services. In Ecosystem Services and Carbon Sequestration in the Biosphere; Lal, R., Lorenz, K., Hüttl, R.F., Schneider, B.U., von Braun, J., Eds.; Springer: Dordrecht, The Netherlands, 2013; pp. 357–381. ISBN 978-94-007-6455-2. [Google Scholar]
  41. Chasek, P.; Akhtar-Schuster, M.; Orr, B.J.; Luise, A.; Rakoto Ratsimba, H.; Safriel, U. Land Degradation Neutrality: The Science-Policy Interface from the UNCCD to National Implementation. Environ. Sci. Policy 2019, 92, 182–190. [Google Scholar] [CrossRef]
  42. Cowie, A.L.; Orr, B.J.; Castillo Sanchez, V.M.; Chasek, P.; Crossman, N.D.; Erlewein, A.; Louwagie, G.; Maron, M.; Metternicht, G.I.; Minelli, S.; et al. Land in Balance: The Scientific Conceptual Framework for Land Degradation Neutrality. Environ. Sci. Policy 2018, 79, 25–35. [Google Scholar] [CrossRef]
  43. Maestre, F.T.; Guirado, E.; Armenteras, D.; Beck, H.E.; AlShalan, M.S.; Al-Saud, N.T.; Chami, R.; Fu, B.; Gichenje, H.; Huber-Sannwald, E.; et al. Bending the Curve of Land Degradation to Achieve Global Environmental Goals. Nature 2025, 644, 347–355. [Google Scholar] [CrossRef]
  44. Teich, I.; Zvoleff, A.; Minelli, S.; O’Connor, B.; Carranza, C. Good Practice Guidance Addendum. SDG Indicator 15.3.1, Proportion of Land That Is Degraded Over Total Land Area; UNCCD: Bonn, Germany, 2025; p. 90. [Google Scholar]
  45. Sims, N.C.; Barger, N.N.; Metternicht, G.I.; England, J.R. A Land Degradation Interpretation Matrix for Reporting on UN SDG Indicator 15.3.1 and Land Degradation Neutrality. Environ. Sci. Policy 2020, 114, 1–6. [Google Scholar] [CrossRef]
  46. Giuliani, G.; Mazzetti, P.; Santoro, M.; Nativi, S.; Van Bemmelen, J.; Colangeli, G.; Lehmann, A. Knowledge Generation Using Satellite Earth Observations to Support Sustainable Development Goals (SDG): A Use Case on Land Degradation. Int. J. Appl. Earth Obs. Geoinf. 2020, 88, 102068. [Google Scholar] [CrossRef]
  47. Ferrara, A.; Kosmas, C.; Salvati, L.; Padula, A.; Mancino, G.; Nolè, A. Updating the MEDALUS-ESA Framework for Worldwide Land Degradation and Desertification Assessment. Land Degrad. Dev. 2020, 31, 1593–1607. [Google Scholar] [CrossRef]
  48. Prăvălie, R.; Patriche, C.; Săvulescu, I.; Sîrodoev, I.; Bandoc, G.; Sfîcă, L. Spatial Assessment of Land Sensitivity to Degradation across Romania. A Quantitative Approach Based on the Modified MEDALUS Methodology. Catena 2020, 187, 104407. [Google Scholar] [CrossRef]
  49. Rajbanshi, J.; Das, S. Monitoring Land Sensitivity to Desertification Using the ESAI Approach and Evaluation of the Key Indicators: A Spatio-Temporal Study in India. Land Degrad. Dev. 2021, 32, 3045–3061. [Google Scholar] [CrossRef]
  50. Gonzalez-Roglich, M.; Zvoleff, A.; Noon, M.; Liniger, H.; Fleiner, R.; Harari, N.; Garcia, C. Synergizing Global Tools to Monitor Progress towards Land Degradation Neutrality: Trends.Earth and the World Overview of Conservation Approaches and Technologies Sustainable Land Management Database. Environ. Sci. Policy 2019, 93, 34–42. [Google Scholar] [CrossRef]
  51. Assennato, F.; Leginio, M.D.; d’Antona, M.; Marinosci, I.; Congedo, L.; Riitano, N.; Luise, A.; Munafò, M. Land Degradation Assessment for Sustainable Soil Management. Ital. J. Agron. 2020, 15, 299–305. [Google Scholar] [CrossRef]
  52. Metternicht, G.; Akhtar-Schuster, M.; Castillo, V. Implementing Land Degradation Neutrality: From Policy Challenges to Policy Opportunities for National Sustainable Development. Environ. Sci. Policy 2019, 100, 189–191. [Google Scholar] [CrossRef]
Figure 1. General processing workflow implemented in PyLM.
Figure 1. General processing workflow implemented in PyLM.
Land 15 00187 g001
Figure 2. General processing workflow of the Landscape Mosaic model and related outputs. The input land cover map (a) is converted into a 3-class (Natural, Agriculture, Developed) map (b); then the proportion for each pixel of the 3 classes is computed within a moving window (10 × 10) in the surroundings (c); based on these proportions, pixels are assigned into 1 of the 19 classes according to the tri-polar schema (d); then it produces the different stratification layers representing the background (e), natural (f), agriculture (g), developed (h), diversity (i), and anthropic intensity (j). Legends are provided on Figure 4. Data source: Swiss Data Cube—https://www.swissdatacube.org (accessed on 17 October 2025); processed with PyLM.
Figure 2. General processing workflow of the Landscape Mosaic model and related outputs. The input land cover map (a) is converted into a 3-class (Natural, Agriculture, Developed) map (b); then the proportion for each pixel of the 3 classes is computed within a moving window (10 × 10) in the surroundings (c); based on these proportions, pixels are assigned into 1 of the 19 classes according to the tri-polar schema (d); then it produces the different stratification layers representing the background (e), natural (f), agriculture (g), developed (h), diversity (i), and anthropic intensity (j). Legends are provided on Figure 4. Data source: Swiss Data Cube—https://www.swissdatacube.org (accessed on 17 October 2025); processed with PyLM.
Land 15 00187 g002
Figure 3. Landscape Mosaic of 19 classes at 10 m resolution for Switzerland in 2018 based on Sentinel-2 derived land cover map using PyLM. Data source: Swiss Data Cube—https://www.swissdatacube.org (accessed on 17 October 2025); processed with PyLM.
Figure 3. Landscape Mosaic of 19 classes at 10 m resolution for Switzerland in 2018 based on Sentinel-2 derived land cover map using PyLM. Data source: Swiss Data Cube—https://www.swissdatacube.org (accessed on 17 October 2025); processed with PyLM.
Land 15 00187 g003
Figure 4. The different stratifications layers derived from the 10 m Sentinel-2 land cover map. Data source: Swiss Data Cube—https://www.swissdatacube.org (accessed on 17 October 2025); processed with PyLM.
Figure 4. The different stratifications layers derived from the 10 m Sentinel-2 land cover map. Data source: Swiss Data Cube—https://www.swissdatacube.org (accessed on 17 October 2025); processed with PyLM.
Land 15 00187 g004
Figure 5. Class frequency distribution showing the relative occurrence frequency of the LM classes’ pixels in Figure 2, visualized in Excel as a heatmap. The top corner (i.e., cell L2) corresponds to the Natural component, whereas the lower-left (i.e., cell B33) and lower-right (i.e., cell V33) corners represent the Developed and Agriculture components, respectively. The color ramp corresponds to the relative occurrence frequency ranging from green (i.e., high frequency) to red (i.e., low frequency).
Figure 5. Class frequency distribution showing the relative occurrence frequency of the LM classes’ pixels in Figure 2, visualized in Excel as a heatmap. The top corner (i.e., cell L2) corresponds to the Natural component, whereas the lower-left (i.e., cell B33) and lower-right (i.e., cell V33) corners represent the Developed and Agriculture components, respectively. The color ramp corresponds to the relative occurrence frequency ranging from green (i.e., high frequency) to red (i.e., low frequency).
Land 15 00187 g005
Figure 6. Landscape Mosaic of 19 classes at 10 m resolution for Switzerland in 2018 based on Sentinel-2 derived land cover map using GTB. Data source: Swiss Data Cube—https://www.swissdatacube.org (accessed on 17 October 2025); processed with GTB. Legend is the same as in Figure 3.
Figure 6. Landscape Mosaic of 19 classes at 10 m resolution for Switzerland in 2018 based on Sentinel-2 derived land cover map using GTB. Data source: Swiss Data Cube—https://www.swissdatacube.org (accessed on 17 October 2025); processed with GTB. Legend is the same as in Figure 3.
Land 15 00187 g006
Figure 7. Comparison between the Western part of Switzerland of the LM 10 classes at 10 m (a) and 100 m (b) spatial resolution. Data source: Swiss Data Cube—https://www.swissdatacube.org (accessed on 17 October 2025); processed with PyLM. Legend is the same as in Figure 3.
Figure 7. Comparison between the Western part of Switzerland of the LM 10 classes at 10 m (a) and 100 m (b) spatial resolution. Data source: Swiss Data Cube—https://www.swissdatacube.org (accessed on 17 October 2025); processed with PyLM. Legend is the same as in Figure 3.
Land 15 00187 g007
Figure 8. Evolution of the dominant LM classes (i.e., LM Background) for the four time periods (1979–1985 (1), 1992–1997 (2), 2004–2009 (3), and 2013–2018 (4)) of the ArealStatistik (accessed on 18 October 2025).
Figure 8. Evolution of the dominant LM classes (i.e., LM Background) for the four time periods (1979–1985 (1), 1992–1997 (2), 2004–2009 (3), and 2013–2018 (4)) of the ArealStatistik (accessed on 18 October 2025).
Land 15 00187 g008
Figure 9. Evolution of the Anthropic Intensity for the four time periods (1979–1985 (1), 1992–1997 (2), 2004–2009 (3), and 2013–2018 (4)) of the ArealStatistik (accessed on 18 October 2025).
Figure 9. Evolution of the Anthropic Intensity for the four time periods (1979–1985 (1), 1992–1997 (2), 2004–2009 (3), and 2013–2018 (4)) of the ArealStatistik (accessed on 18 October 2025).
Land 15 00187 g009
Table 1. Vegetation classes with corresponding area, proportion of Valais territory, and altitude mean.
Table 1. Vegetation classes with corresponding area, proportion of Valais territory, and altitude mean.
LCCS DescriptionLCCS CodeLM DescriptionLM Code
Cultivated Terrestrial Vegetated111Agriculture1
Natural Terrestrial Vegetated112Natural2
Cultivated Aquatic Vegetated123Agriculture1
Natural Aquatic Vegetated124Natural2
Artificial Surface215Developed3
Bare Surface216Natural2
Artificial Water227Developed3
Natural Water228Natural2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Giuliani, G. PyLM: A Python Implementation for Landscape Mosaic Analysis. Land 2026, 15, 187. https://doi.org/10.3390/land15010187

AMA Style

Giuliani G. PyLM: A Python Implementation for Landscape Mosaic Analysis. Land. 2026; 15(1):187. https://doi.org/10.3390/land15010187

Chicago/Turabian Style

Giuliani, Gregory. 2026. "PyLM: A Python Implementation for Landscape Mosaic Analysis" Land 15, no. 1: 187. https://doi.org/10.3390/land15010187

APA Style

Giuliani, G. (2026). PyLM: A Python Implementation for Landscape Mosaic Analysis. Land, 15(1), 187. https://doi.org/10.3390/land15010187

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop