Isolation Forest for Environmental Monitoring: A Data-Driven Approach to Land Management
Abstract
:1. Introduction
2. Materials and Methods
2.1. Study Area
2.2. Satellite Imagery and Multispectral Index Calculation
2.3. Isolation Forest Algorithm
- Import libraries:
- -
- numpy, rasterio, IsolationForest, matplotlib.pyplot
- Create and define a function “spectral_index_difference_image”:
- -
- Open TIFF image with rasterio
- -
- Read and return spectral_index_difference data
- -
- Reproject the raster using “reproject()” with bilinear resampling to match the reference profile
- -
- Return the reprojected raster data
- Load spectral image data:
- -
- Define a list of file paths for different images
- -
- Open the first raster file to use as the reference profile
- -
- Apply the “reproject_raster()” function to all files to ensure alignment
- Stack spectral indices into a multidimensional feature space—feature_matrix—Reshape into a 2D array
- Initialize Isolation Forest model with contamination parameter
- Predict anomalies:
- -
- Predict anomalies (1 = normal, −1 = anomaly)
- -
- Reshape the anomaly predictions to the original image dimensions
- Visualize anomaly scores:
- -
- Plot the anomaly map using “matplotlib.pyplot.imshow()” with a color map
- Save anomaly scores to a GeoTIFF:
- -
- Create and write the anomaly score results using “rasterio.open()” with the reference profile
- Evaluate using the ROC curve
- Display all plots and print results
2.4. Accuracy Assessment
3. Results
3.1. Sentinel-2 Data Index Differences Calculation
3.2. Isolation Forest Differences Index Application
4. Discussion
5. Conclusions and Future Directions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Massarelli, C.; Galeone, C.; Savino, I.; Campanale, C.; Uricchio, V.F. Towards sustainable management of mussel farming through high-resolution images and open source software—The taranto case study. Remote Sens. 2021, 13, 2985. [Google Scholar] [CrossRef]
- Bruno, M.F.; Saponieri, A.; Molfetta, M.G.; Damiani, L. The DPSIR Approach for Coastal Risk Assessment under Climate Change at Regional Scale: The Case of Apulian Coast (Italy). J. Mar. Sci. Eng. 2020, 8, 531. [Google Scholar] [CrossRef]
- Ntona, M.M.; Busico, G.; Mastrocicco, M.; Kazakis, N. Coupling SWAT and DPSIR models for groundwater management in Mediterranean catchments. J. Environ. Manag. 2023, 344, 118543. [Google Scholar] [CrossRef] [PubMed]
- Labianca, C.; De Gisi, S.; Todaro, F.; Notarnicola, M. DPSIR Model Applied to the Remediation of Contaminated Sites. A Case Study: Mar Piccolo of Taranto. Appl. Sci. 2020, 10, 5080. [Google Scholar] [CrossRef]
- Spanò, M.; Gentile, F.; Davies, C.; Lafortezza, R. The DPSIR framework in support of green infrastructure planning: A case study in Southern Italy. Land Use Policy 2017, 61, 242–250. [Google Scholar] [CrossRef]
- Osman, K.T. Soil Resources and Soil Degradation. In Soils; Springer: Dordrecht, The Netherlands, 2013; pp. 175–213. [Google Scholar]
- Singh, R.L.; Singh, P.K. Global Environmental Problems. In Principles and Applications of Environmental Biotechnology for a Sustainable Future; Springer: Singapore, 2017; pp. 13–41. [Google Scholar]
- Rathod, S.V. Eco-Restoration of Polluted Environment; CRC Press: Boca Raton, FL, USA, 2024; ISBN 9781003423393. [Google Scholar]
- Massarelli, C.; Losacco, D.; Tumolo, M.; Campanale, C.; Uricchio, V.F. Protection of Water Resources from Agriculture Pollution: An Integrated Methodological Approach for the Nitrates Directive 91/676/EEC Implementation. Int. J. Environ. Res. Public Health 2021, 18, 13323. [Google Scholar] [CrossRef]
- Zeng, Y.; Hao, D.; Huete, A.; Dechant, B.; Berry, J.; Chen, J.M.; Joiner, J.; Frankenberg, C.; Bond-Lamberty, B.; Ryu, Y.; et al. Optical vegetation indices for monitoring terrestrial ecosystems globally. Nat. Rev. Earth Environ. 2022, 3, 477–493. [Google Scholar] [CrossRef]
- Addabbo, P.; Focareta, M.; Marcuccio, S.; Votto, C.; Ullo, S.L. Contribution of Sentinel-2 data for applications in vegetation monitoring. Acta Imeko 2016, 5, 44. [Google Scholar] [CrossRef]
- Hino, M.; Benami, E.; Brooks, N. Machine learning for environmental monitoring. Nat. Sustain. 2018, 1, 583–588. [Google Scholar] [CrossRef]
- Khruschev, S.S.; Plyusnina, T.Y.; Antal, T.K.; Pogosyan, S.I.; Riznichenko, G.Y.; Rubin, A.B. Machine learning methods for assessing photosynthetic activity: Environmental monitoring applications. Biophys. Rev. 2022, 14, 821–842. [Google Scholar] [CrossRef]
- Nguyen, H.A.T.; Sophea, T.; Gheewala, S.H.; Rattanakom, R.; Areerob, T.; Prueksakorn, K. Integrating remote sensing and machine learning into environmental monitoring and assessment of land use change. Sustain. Prod. Consum. 2021, 27, 1239–1254. [Google Scholar] [CrossRef]
- Jesus, G.; Casimiro, A.; Oliveira, A. Using Machine Learning for Dependable Outlier Detection in Environmental Monitoring Systems. ACM Trans. Cyber-Phys. Syst. 2021, 5, 1–30. [Google Scholar] [CrossRef]
- Radočaj, D.; Obhođaš, J.; Jurišić, M.; Gašparović, M. Global Open Data Remote Sensing Satellite Missions for Land Monitoring and Conservation: A Review. Land 2020, 9, 402. [Google Scholar] [CrossRef]
- Zhong, S.; Zhang, K.; Bagheri, M.; Burken, J.G.; Gu, A.; Li, B.; Ma, X.; Marrone, B.L.; Ren, Z.J.; Schrier, J.; et al. Machine Learning: New Ideas and Tools in Environmental Science and Engineering. Environ. Sci. Technol. 2021, 55, 12741–12754. [Google Scholar] [CrossRef]
- Binetti, M.S.; Campanale, C.; Uricchio, V.F.; Massarelli, C. In-Depth Monitoring of Anthropic Activities in the Puglia Region: What Is the Acceptable Compromise between Economic Activities and Environmental Protection? Sustainability 2023, 15, 8875. [Google Scholar] [CrossRef]
- Ustin, S.L.; Middleton, E.M. Current and Near-Term Earth-Observing Environmental Satellites, Their Missions, Characteristics, Instruments, and Applications. Sensors 2024, 24, 3488. [Google Scholar] [CrossRef] [PubMed]
- Ndehedehe, C. Satellite Remote Sensing of Terrestrial Hydrology; Springer International Publishing: Cham, Switzerland, 2022; ISBN 978-3-030-99576-8. [Google Scholar]
- Meng, R.; Zhao, F. Remote Sensing of Fire Effects. In Remote Sensing of Hydrometeorological Hazards; CRC Press: Boca Raton, FL, USA; Taylor & Francis: Abingdon, UK, 2017; pp. 261–283. [Google Scholar]
- Kurbanov, E.; Vorobev, O.; Lezhnin, S.; Sha, J.; Wang, J.; Li, X.; Cole, J.; Dergunov, D.; Wang, Y. Remote Sensing of Forest Burnt Area, Burn Severity, and Post-Fire Recovery: A Review. Remote Sens. 2022, 14, 4714. [Google Scholar] [CrossRef]
- Massarelli, C. Fast detection of significantly transformed areas due to illegal waste burial with a procedure applicable to Landsat images. Int. J. Remote Sens. 2018, 39, 754–769. [Google Scholar] [CrossRef]
- Vaverková, M.D.; Maxianová, A.; Winkler, J.; Adamcová, D.; Podlasek, A. Environmental consequences and the role of illegal waste dumps and their impact on land degradation. Land Use Policy 2019, 89, 104234. [Google Scholar] [CrossRef]
- Iravanian, A.; Ravari, S.O. Types of Contamination in Landfills and Effects on The Environment: A Review Study. IOP Conf. Ser. Earth Environ. Sci. 2020, 614, 012083. [Google Scholar] [CrossRef]
- Binetti, M.S.; Massarelli, C.; Uricchio, V.F. Machine Learning in Geosciences: A Review of Complex Environmental Monitoring Applications. Mach. Learn. Knowl. Extr. 2024, 6, 1263–1280. [Google Scholar] [CrossRef]
- Tercan, E.; Dereli, M. Monitoring of marble quarries expansion and land cover changes using satellite images and GIS on a rural settlement of Burdur province, Turkey. El-Cezeri Fen Ve Mühendislik Derg. 2021, 8, 741–750. [Google Scholar] [CrossRef]
- Nikolakopoulos, K.G.; Tsombos, P.I.; Vaiopoulos, A.D. Monitoring a Quarry Using High Resolution Data and GIS Techniques; Michel, U., Civco, D.L., Eds.; SPIE: Bellingham, WA, USA, 2010; p. 78310R. [Google Scholar]
- Parise, M.; Pascali, V. Surface and subsurface environmental degradation in the karst of Apulia (southern Italy). Environ. Geol. 2003, 44, 247–256. [Google Scholar] [CrossRef]
- Bosellini, A. Outline of the Geology of Italy. In World Geomorphological Landscapes; Springer: Cham, Switzerland, 2017; pp. 21–27. [Google Scholar] [CrossRef]
- Biondi, E.; Casavecchia, S.; Guerra, V.; Medagli, P.; Beccarisi, L.; Zuccarello, V. A contribution towards the knowledge of semideciduous and evergreen woods of Apulia (south-eastern Italy). Fitosociologia 2004, 41, 3–28. [Google Scholar]
- Sentinel-2|Copernicus Data Space Ecosystem. Available online: https://dataspace.copernicus.eu/explore-data/data-collections/sentinel-data/sentinel-2 (accessed on 19 March 2025).
- Spoto, F.; Sy, O.; Laberinti, P.; Martimort, P.; Fernandez, V.; Colin, O.; Hoersch, B.; Meygret, A. Overview of sentinel-2. In Proceedings of the 2012 IEEE International Geoscience and Remote Sensing Symposium, Munich, Germany, 22–27 July 2012; pp. 1707–1710. [Google Scholar] [CrossRef]
- Copernicus Data Space Ecosystem|Europe’s Eyes on Earth. Available online: https://dataspace.copernicus.eu/ (accessed on 4 November 2024).
- Tichouiti, K. NVDI- and NBR-based Comparison for Burnt Areas Characterization Using Sentinel-2 Imagery. In Proceedings of the 2024 IEEE Mediterranean and Middle-East Geoscience and Remote Sensing Symposium (M2GARSS), Oran, Algeria, 15–17 April 2024; pp. 187–190. [Google Scholar] [CrossRef]
- Bitek, D.; Erenoğlu, R.C. Forest Fire Analysis with Sentinel-2 Satellite Imagery: The Case of Mati (Greece) in 2018. Acad. Platf. J. Nat. Hazards Disaster Manag. 2022, 3, 85–98. [Google Scholar] [CrossRef]
- D’Odorico, P.; Gonsamo, A.; Damm, A.; Schaepman, M.E. Experimental evaluation of sentinel-2 spectral response functions for NDVI time-series continuity. IEEE Trans. Geosci. Remote Sens. 2013, 51, 1336–1348. [Google Scholar] [CrossRef]
- Alcaras, E.; Costantino, D.; Guastaferro, F.; Parente, C.; Pepe, M. Normalized Burn Ratio Plus (NBR+): A New Index for Sentinel-2 Imagery. Remote Sens. 2022, 14, 1727. [Google Scholar] [CrossRef]
- Cruz-Sanabria, H.; Sanchez, M.G.; Rivera-Caicedo, J.P.; Avila-George, H. Identification of phenological stages of sugarcane cultivation using Sentinel-2 images. In Proceedings of the 2020 9th International Conference on Software Process Improvement (CIMPS), Sinaloa, Mexico, 21–23 October 2020; IEEE: New York, NY, USA, 2020; pp. 110–116. [Google Scholar]
- Lee, S.-J.; Choi, C.; Kim, J.; Choi, M.; Cho, J.; Lee, Y. Estimation of High-Resolution Soil Moisture in Canadian Croplands Using Deep Neural Network with Sentinel-1 and Sentinel-2 Images. Remote Sens. 2023, 15, 4063. [Google Scholar] [CrossRef]
- Hunter, J.D. Matplotlib: A 2D Graphics Environment. Comput. Sci. Eng. 2007, 9, 90–95. [Google Scholar] [CrossRef]
- Harris, C.R.; Millman, K.J.; van der Walt, S.J.; Gommers, R.; Virtanen, P.; Cournapeau, D.; Wieser, E.; Taylor, J.; Berg, S.; Smith, N.J.; et al. Array programming with NumPy. Nature 2020, 585, 357–362. [Google Scholar] [CrossRef]
- Fabian, P. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- Introducing Rasterio|Sean Gillies. Available online: https://sgillies.net/2013/11/24/introducing-rasterio.html (accessed on 25 March 2025).
- Liu, F.T.; Ting, K.M.; Zhou, Z.H. Isolation forest. In Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, Pisa, Italy, 15–19 December 2008; pp. 413–422. [Google Scholar] [CrossRef]
- Liu, F.T.; Ting, K.M.; Zhou, Z.H. Isolation-Based Anomaly Detection. ACM Trans. Knowl. Discov. Data 2012, 6, 3. [Google Scholar] [CrossRef]
- Foody, G.M. Explaining the unsuitability of the kappa coefficient in the assessment and comparison of the accuracy of thematic maps obtained by image classification. Remote Sens. Environ. 2020, 239, 111630. [Google Scholar] [CrossRef]
- Sari, I.L.; Weston, C.J.; Newnham, G.J.; Volkova, L. Estimating land cover map accuracy and area uncertainty using a confusion matrix: A case study in Kalimantan, Indonesia. IOP Conf. Ser. Earth Environ. Sci. 2021, 914, 012025. [Google Scholar] [CrossRef]
- Ariza-Lopez, F.J.; Rodriguez-Avi, J.; Alba-Fernandez, M.V. Complete Control of an Observed Confusion Matrix. In Proceedings of the IGARSS 2018—2018 IEEE International Geoscience and Remote Sensing Symposium, Valencia, Spain, 22–27 July 2018; IEEE: New York, NY, USA, 2018; pp. 1222–1225. [Google Scholar]
- Massarelli, C.; Matarrese, R.; Uricchio, V.F.; Muolo, M.R.; Laterza, M.; Ernesto, L. Detection of asbestos-containing materials in agro-ecosystem by the use of airborne hyperspectral CASI-1500 sensor including the limited use of two UAVs equipped with RGB cameras. Int. J. Remote Sens. 2016, 38, 2135–2149. [Google Scholar] [CrossRef]
- Çorbacıoğlu, Ş.K.; Aksel, G. Receiver operating characteristic curve analysis in diagnostic accuracy studies: A guide to interpreting the area under the curve value. Turkish J. Emerg. Med. 2023, 23, 195–198. [Google Scholar] [CrossRef]
- Gibson, R.; Danaher, T.; Hehir, W.; Collins, L. A remote sensing approach to mapping fire severity in south-eastern Australia using sentinel 2 and random forest. Remote Sens. Environ. 2020, 240, 111702. [Google Scholar] [CrossRef]
- Collins, L.; McCarthy, G.; Mellor, A.; Newell, G.; Smith, L. Training data requirements for fire severity mapping using Landsat imagery and random forest. Remote Sens. Environ. 2020, 245, 111839. [Google Scholar] [CrossRef]
- Saulino, L.; Rita, A.; Migliozzi, A.; Maffei, C.; Allevato, E.; Garonna, A.P.; Saracino, A. Detecting Burn Severity across Mediterranean Forest Types by Coupling Medium-Spatial Resolution Satellite Imagery and Field Data. Remote Sens. 2020, 12, 741. [Google Scholar] [CrossRef]
- Franco, M.G.; Mundo, I.A.; Veblen, T.T. Field-Validated Burn-Severity Mapping in North Patagonian Forests. Remote Sens. 2020, 12, 214. [Google Scholar] [CrossRef]
- Morante-Carballo, F.; Bravo-Montero, L.; Carrión-Mero, P.; Velastegui-Montoya, A.; Berrezueta, E. Forest Fire Assessment Using Remote Sensing to Support the Development of an Action Plan Proposal in Ecuador. Remote Sens. 2022, 14, 1783. [Google Scholar] [CrossRef]
- Luz, A.E.O.; Negri, R.G.; Massi, K.G.; Colnago, M.; Silva, E.A.; Casaca, W. Mapping Fire Susceptibility in the Brazilian Amazon Forests Using Multitemporal Remote Sensing and Time-Varying Unsupervised Anomaly Detection. Remote Sens. 2022, 14, 2429. [Google Scholar] [CrossRef]
- Himmy, O.; Nguyen, T.T.; Hemmler, K.S.; Loulad, S.; Rhinane, H.; Buerkert, A. Leveraging machine learning and Landsat time series for high-resolution mapping of mining-induced vegetation changes in Ouagadougou, Burkina Faso. Environ. Chall. 2024, 17, 101026. [Google Scholar] [CrossRef]
- Michałowska, K.; Pirowski, T.; Głowienka, E.; Szypuła, B.; Malinverni, E.S. Sustainable Monitoring of Mining Activities: Decision-Making Model Using Spectral Indexes. Remote Sens. 2024, 16, 388. [Google Scholar] [CrossRef]
- Gallwey, J.; Robiati, C.; Coggan, J.; Vogt, D.; Eyre, M. A Sentinel-2 based multispectral convolutional neural network for detecting artisanal small-scale mining in Ghana: Applying deep learning to shallow mining. Remote Sens. Environ. 2020, 248, 111970. [Google Scholar] [CrossRef]
- Mukherjee, J.; Mukherjee, J.; Chakravarty, D. Detection of Coal Quarry and Coal Dump Regions Using the Presence of Mine Water Bodies from Landsat 8 OLI/TIRS Images. In Communications in Computer and Information Science; Springer: Cham, Switzerland, 2023; Volume 1777 CCIS, pp. 190–204. [Google Scholar]
- Massarelli, C.; Uricchio, V.F. The Contribution of Open Source Software in Identifying Environmental Crimes Caused by Illicit Waste Management in Urban Areas. Urban Sci. 2024, 8, 21. [Google Scholar] [CrossRef]
- Mouret, F.; Albughdadi, M.; Duthoit, S.; Kouamé, D.; Rieu, G.; Tourneret, J.Y. Outlier Detection at the Parcel-Level in Wheat and Rapeseed Crops Using Multispectral and SAR Time Series. Remote Sens. 2021, 13, 956. [Google Scholar] [CrossRef]
- Zhang, H.; Zhang, Y.; Gao, T.; Lan, S.; Tong, F.; Li, M. Landsat 8 and Sentinel-2 Fused Dataset for High Spatial-Temporal Resolution Monitoring of Farmland in China’s Diverse Latitudes. Remote Sens. 2023, 15, 2951. [Google Scholar] [CrossRef]
Study Case | Spectral Indices | Sentinel-2 Band Formula |
---|---|---|
Wildfire study case | Normalized Difference Vegetation Index Normalized Burn Ratio Normalized Difference Moisture Index | |
Quarry study case | Normalized Difference Vegetation Index Enhanced Vegetation Index Soil Adjusted Vegetation Index |
Metrics | Wildfire Study Case | Quarry Study Case |
---|---|---|
Overall Accuracy | 98% | 95% |
Kappa Hat Value | 0.78 | 0.34 |
Producer’s Accuracy (PA) | ||
Classe 0 | 99% | 96% |
Classe 1 | 82% | 87% |
User’s Accuracy (UA) | ||
Classe 0 | 99% | 99% |
Classe 1 | 74% | 22% |
ROC AUC | 0.9070 | 0.8096 |
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. |
© 2025 by the authors. 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Binetti, M.S.; Uricchio, V.F.; Massarelli, C. Isolation Forest for Environmental Monitoring: A Data-Driven Approach to Land Management. Environments 2025, 12, 116. https://doi.org/10.3390/environments12040116
Binetti MS, Uricchio VF, Massarelli C. Isolation Forest for Environmental Monitoring: A Data-Driven Approach to Land Management. Environments. 2025; 12(4):116. https://doi.org/10.3390/environments12040116
Chicago/Turabian StyleBinetti, Maria Silvia, Vito Felice Uricchio, and Carmine Massarelli. 2025. "Isolation Forest for Environmental Monitoring: A Data-Driven Approach to Land Management" Environments 12, no. 4: 116. https://doi.org/10.3390/environments12040116
APA StyleBinetti, M. S., Uricchio, V. F., & Massarelli, C. (2025). Isolation Forest for Environmental Monitoring: A Data-Driven Approach to Land Management. Environments, 12(4), 116. https://doi.org/10.3390/environments12040116