PyLM: A Python Implementation for Landscape Mosaic Analysis
Abstract
1. Introduction
2. Materials and Methods
2.1. LM Classification Framework
2.2. Implementation
- 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).
3. Results
3.1. PyLM Analysis at 10 m Resolution of Switzerland
3.2. Comparison with GTB Output
3.3. Comparison with the Reference Land Cover Map of Switzerland
3.4. Different Time Periods
4. Discussion
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- 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]
- 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]
- 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]
- Bosch, M. PyLandStats: An Open-Source Pythonic Library to Compute Landscape Metrics. PLoS ONE 2019, 14, e0225734. [Google Scholar] [CrossRef]
- Frazier, A.E.; Kedron, P. Landscape Metrics: Past Progress and Future Directions. Curr. Landsc. Ecol. Rep. 2017, 2, 63–72. [Google Scholar] [CrossRef]
- 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]
- Vogt, P.; Wickham, J.; Barredo, J.I.; Riitters, K. Revisiting the Landscape Mosaic Model. PLoS ONE 2024, 19, e0304215. [Google Scholar] [CrossRef]
- 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).
- 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).
- Vogt, P.; Riitters, K. GuidosToolbox: Universal Digital Image Object Analysis. Eur. J. Remote Sens. 2017, 50, 352–361. [Google Scholar] [CrossRef]
- 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]
- Perkel, J.M. Why Jupyter Is Data Scientists’ Computational Notebook of Choice. Nature 2018, 563, 145–146. [Google Scholar] [CrossRef]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- Swiss Federal Statistical Office. Land Use in Switzerland—Results of the Swiss Land Use Statistics; SFO: Neuchâtel, Switzerland, 2013. [Google Scholar]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- UNCCD. Global Land Outlook: Land Restoration for Recovery and Resilience; UNCCD: Bonn, Germany, 2022; p. 204. [Google Scholar]
- 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]
- 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]
- Manakos, I.; Gutman, G.; Kalaitzidis, C. Monitoring Land Cover Change: Towards Sustainability. Land 2021, 10, 1356. [Google Scholar] [CrossRef]
- 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]
- Barbier, E.B.; Hochard, J.P. Land Degradation and Poverty. Nat. Sustain. 2018, 1, 623–631. [Google Scholar] [CrossRef]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]









| LCCS Description | LCCS Code | LM Description | LM Code |
|---|---|---|---|
| Cultivated Terrestrial Vegetated | 111 | Agriculture | 1 |
| Natural Terrestrial Vegetated | 112 | Natural | 2 |
| Cultivated Aquatic Vegetated | 123 | Agriculture | 1 |
| Natural Aquatic Vegetated | 124 | Natural | 2 |
| Artificial Surface | 215 | Developed | 3 |
| Bare Surface | 216 | Natural | 2 |
| Artificial Water | 227 | Developed | 3 |
| Natural Water | 228 | Natural | 2 |
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. |
© 2026 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Giuliani, G. PyLM: A Python Implementation for Landscape Mosaic Analysis. Land 2026, 15, 187. https://doi.org/10.3390/land15010187
Giuliani G. PyLM: A Python Implementation for Landscape Mosaic Analysis. Land. 2026; 15(1):187. https://doi.org/10.3390/land15010187
Chicago/Turabian StyleGiuliani, Gregory. 2026. "PyLM: A Python Implementation for Landscape Mosaic Analysis" Land 15, no. 1: 187. https://doi.org/10.3390/land15010187
APA StyleGiuliani, G. (2026). PyLM: A Python Implementation for Landscape Mosaic Analysis. Land, 15(1), 187. https://doi.org/10.3390/land15010187
