Introduction

Mangroves are estuarine and marine-coastal ecosystems formed by trees and shrubs with unique morphological and physiological adaptations (Das et al. 2022). Their attributes include exposed roots that provide oxygen, additional stem support structures, and leaves that excrete salt (Srikanth et al. 2016). Mangroves are adapted to brackish water, tidal conditions, and saturated soils. This type of vegetation grows in the intertidal zone of tropical and subtropical regions around the equator (Duke 2017). Mangroves are recognized as “blue carbon ecosystems” due to their unique ability to absorb carbon dioxide from the atmosphere and store it in their soil and biomass (Chatting et al. 2022). Mangroves are highly productive (Komiyama et al. 2008) and therefore important for local economies since they provide provisioning services like food and timber (Rivera-Monroy et al. 2017), coastal protection (Hespen et al. 2023), and cultural benefits such as social relations, knowledge, recreation, heritage values, and ecotourism (Treviño 2022).

Nonetheless, mangrove forest cover continues to decrease due to land use transformations into urban, agricultural, and aquaculture exploitations (Ashton 2022). Mangroves face additional threats from contamination originating from wastewater, garbage, and natural factors such as coastal erosion, climate change, and extreme weather events (Gorman 2018; Hagger et al. 2022). Between 1996 and 2020, 3.6% (5245.24 km2) of mangrove forest was lost worldwide (Leal et al. 2022). Restoration and conservation programs have been initiated to address the loss of mangrove surface and ecosystem quality, with different degrees of success. The lack of control and monitoring by local authorities, particularly in developing countries, is among the reasons for the dilution or failure of restoration programs (Dale et al. 2014). Developing robust, accessible, and user-friendly monitoring systems is essential to assess mangrove health, evaluate management effectiveness, and ensure long-term success (Worthington and Spalding 2018). These systems should be fast, intuitive, customizable, and supported by technical assistance.

Monitoring mangroves through in situ observations faces impractical challenges related to access, cost, and time. In contrast, the utilization of remote sensing (RS) technology has proven indispensable for mangrove monitoring. Its ability to identify, map, and monitor land cover types (Kuenzer et al. 2011) offers the advantage of frequent revisits and the capacity to retrieve information over large areas using different electromagnetic spectrum ranges (Cárdenas et al. 2017). The accessibility to a growing archive of open-access Earth observation data, coupled with advancing technological development, provides cost-effective solutions for assessing changes in marine ecosystems worldwide (Vos et al. 2019). These technologies have demonstrated success in various applications, such as seagrass monitoring (Chowdhury et al. 2023), tracking changes within estuaries and coastal areas (Dahdouh-Guebas 2022), and monitoring coral reefs (Lubin et al. 2001). Furthermore, the integration of AI-based surveillance systems is increasingly prevalent in applications like water quality assessment (Caballero et al. 2022), seagrass mapping (Kennedy et al. 2021), and the comprehensive examination of marine environments (Li et al. 2021, 2022).

Although optical data from passive sensors are commonly used in RS applications, they are hindered by cloud cover, which is particularly persistent in the tropics (Shikwambana 2022) and also by other atmospheric factors such as smoke and fog. Synthetic Aperture Radar (SAR) sensors, on the other hand, are active sensors that emit pulses and measure the backscatter reflected from the target. SAR sensors have the distinct advantage of penetrating clouds and smoke. Their ability to differentiate mangroves from other land cover types is based on surface roughness and water content (Lechner et al. 2020). However, interpreting SAR data can be challenging (Wang et al. 2019). Studies have shown that integrating SAR and optical data can improve the distinction between mangroves and other types of forests (Ghorbanian et al. 2021; Hu et al. 2020; Huang et al. 2022; Chan-Bagot et al. 2024). Achieving this integration requires the implementation of automated image pre-processing and classification approaches (Giri 2021).

The implementation of RS techniques in developing countries is often hindered by economic, administrative, and technical constraints. Barriers such as the need for software, hardware, internet connectivity, and technical have impeded widespread adoption (Haack and Ryerson 2016). Consequently, there is an urgent demand for the development of robust monitoring systems that can operate independently of governmental and administrative circumstances. These systems should enable regular monitoring of the mangrove ecosystem in a cost-effective manner.

Moreover, the utilization of RS demands a high level of expertise and relies on high-performance software and hardware, limiting its accessibility for researchers and managers (Zapata-Ramírez et al. 2023). Google Earth Engine (GEE), a cloud computing platform designed for geospatial analysis (http://earthengine.google.org), serves as an alternative and accessible resource for coastal monitoring. GEE integrates petabytes of freely available RS datasets (Gorelick et al. 2017). Since its availability for research in 2010 (Kumar and Mutanga 2018), GEE has been leveraged for numerous applications (Tamiminia et al. 2020). In the monitoring of marine ecosystems, GEE has proven valuable for global mapping of seagrass meadows (Traganos et al. 2018), assessment of sand spit variability (Roca et al. 2022), and evaluation of mangrove extension (Kolli et al. 2022). Significantly, the results from these studies underscore the cost-effectiveness and speed of these cloud-based applications.

Recent initiatives utilizing remote sensing have achieved significant advancements in worldwide mangrove monitoring. The Global Mangrove Watch (GMW), led by the Global Mangrove Alliance (GMA), is a prominent project providing a comprehensive extent product. Through its web-viewer, GMW offers accessible information on the location and extent of mangrove changes from 1996 to 2020. GMW utilizes SAR data from ALOS PALSAR and optical data from Landsat (2010) to create a mangrove extent baseline (Bunting et al. 2022b). For change detection in different time periods, SAR L-band data from JERS-1 (1996) and ALOS PALSAR (2007–2010, 2015–2020) are employed (Bunting et al. 2022a). While GMW’s accuracy varies across locations, it remains a valuable global resource (Thomas et al. 2017). Building upon GMW, a regional mangrove loss alert system has been prototyped for Africa, focusing on the period from 2018 to 2022. This system aims to detect monthly mangrove losses using Sentinel-2 normalized difference vegetation index (NDVI) thresholds and a temporal scoring system to reduce false positives. The estimated overall accuracy of this system is 92.1% (Bunting et al. 2023).

Another notable tool for mangrove mapping is Google Earth Engine Mangrove Mapping Methodology (GEEMMM). GEEMMM is a local and replicable approach that utilizes Landsat data to generate mangrove coverage maps. It incorporates tidal conditions as a significant factor affecting the optical reflectance of mangroves. Developed on the GEE cloud computing platform, GEEMMM has been successfully evaluated on Myanmar’s coast (Burma), producing both high-tide and low-tide products, with data from 2014 to 2018 and overall accuracy of 96.1% (Yancho et al. 2020). As noted, the period of analysis requires a large data series, so GEEMMM is limited by the availability of cloud-free Landsat data and lacks a change detection module.

Both GMW and GEEMMM showcase how technological advancements have facilitated the development and implementation of mapping methodologies, making remote sensing more accessible and cost-effective for a broader audience (Giri 2021). However, these models have limitations that require addressing to enhance their effectiveness. GEEMMM and the GMW alert system face constraints due to the limited availability of optical data caused by cloud cover. Furthermore, GMW v3.0, being a global model, experiences extended update times, country-level data is provided only up to 2020, and it lacks the option to obtain data for different territorial levels or time periods, thus limiting the generation of current information. Addressing these limitations will contribute to improving the accuracy and applicability of remote sensing mangrove mapping methodologies at regional and local scales.

To enhance mangrove mapping, we have developed MANGLEE, an open and multi-user tool that leverages cloud computing (GEE) to prioritize the monitoring of mangroves with a short revisit period and high spatial resolution (10 m). MANGLEE incorporates SAR images to circumvent the limitations associated with the lack of good-quality optical data in these coastal environments. MANGLEE performs tasks of data preparation, classification, and change detection, organized in three modules. The results from MANGLEE will enable stakeholders to monitor changes in mangrove ecosystems in any desired period and location. To evaluate the performance of MANGLEE, we utilized data from 2018 to 2022 in Guayas, Ecuador, where the mangrove ecosystem faces multiple threats, including urban transformation, agriculture, and aquaculture pressures. By analyzing the MANGLEE results, we aim to understand its advantages and limitations.

Materials and Methods

MANGLEE leverages remote sensing data and employs machine learning classification (Random Forest) to accurately identify and map the extent of mangroves. It also utilizes date comparisons to assess changes in mangrove location and extension, and since it is based on Google Earth Engine (GEE), it is easily accessible and freely available (MANGLEE). Figure 1 provides an overview of the MANGLEE workflow. In the following sections, we describe each of the methodological steps in detail.

Fig. 1
figure 1

Schematic flowchart of MANGLEE stages

Input Data

Satellite Data

MANGLEE, in its fundamental design, integrates Earth Observation (EO) data from the Sentinel-1 and Sentinel-2 missions within the European Union Copernicus program operated by the European Space Agency (ESA).

The Sentinel-1 (S1) mission comprises a constellation of two polar orbiting satellites, namely S1A and S1B. Each satellite is equipped with a dual-polarization C-band Synthetic Aperture Radar (SAR) instrument, operating at a frequency of 5.4 GHz. SAR has the advantage of operating efficiently irrespective of weather conditions, enabling it to collect data continuously, day or night, over any given location. Combining the two S1 satellites results in a nominal revisit frequency of 6 days. However, it is worth noting that in 2022, the S1B satellite ceased operations due to a system failure, leaving the mission with only one functioning satellite. Consequently, the current nominal data frequency has extended to 12 days until the next S1 satellite becomes operational (ESA n.d.b) The S1 Ground Range Detected (GRD) data scenes are integrated into the GEE platform. ESA has processed these scenes, utilizing the Sentinel-1 Toolbox. SAR pre-processing entails the following stages: 1, apply orbit file; 2, GRD border noise removal; 3, thermal noise removal; 4, radiometric calibration; and 5, terrain correction (Google Earth Engine n.d.b).

The Sentinel-2 (S2) mission encompasses a constellation of two polar orbiting satellites, namely S2A and S2B. At the Equator, S2 has a nominal revisit of 5 days. The S2A and S2B satellites are equipped with a multispectral instrument (MSI) that comprises 13 spectral bands, each serving unique purposes. The blue (B2), green (B3), red (B4), and one of the near-infrared (B8) bands provide data with 10-m spatial resolution; the red edge (B5), near-infrared (B6, B7, and B8A), and short-wave infrared SWIR (B11 and B12) bands provide data with 20-m spatial resolution; and the coastal aerosol (B1), water vapor (B9), and SWIR cirrus (B10) bands provide data with 60 m (ESA n.d.a). Within the GEE platform, S2 data is stored at Level-1C (L1C), denoting top-of-atmosphere reflectance, and at Level-2A (L2A), which has undergone atmospheric correction using the Sen2Cor algorithm (Google Earth Engine n.d.a). The GEE Catalog also includes the S2 Cloud Probability dataset, a valuable resource for identifying and characterizing cloud cover or highly reflective surfaces. The values within this dataset range from 0 to 100, with higher values indicating a higher likelihood of clouds or highly reflective surfaces.

Auxiliary Datasets

MANGLEE requires various inputs to run. These inputs should be loaded as assets to the active user’s GEE account. The required datasets are a polygon shapefile of the study area (AOI); a training shapefile composed of points or polygons labeled as mangrove and non-mangrove with a column named “Class_t” in its table and recording integer values (i.e., mangrove = 1, non-mangrove = 2); and a validation shapefile with ground truth points labeled similarly as the training records within a column named “Class_v.”

Construction of the MANGLEE Algorithm

MANGLEE is built on the GEE platform and leverages the cloud-based Jupyter environment known as Google Colaboratory, or Colab for short. This web-based interface runs directly in a browser and enables machine learning coding for artificial intelligence. MANGLEE’s functionalities are implemented through a collection of three distinct modules, each housed within independent notebooks. These notebooks utilize the geemap library for Python. By incorporating executable code and rich text within a single document, Collab notebooks empower MANGLEE users to effortlessly blend informative explanations with the code, fostering a comprehensive understanding of the underlying processes. All three MANGLEE modules are freely accessible at the GitHub repository.

MANGLEE Module 1 (M1): Satellite Data Preparation

Optical Data Preparation

Obtaining cloud-free optical data is particularly challenging in tropical and subtropical areas with mangroves, due to persistent cloud coverage. To address this issue and achieve consistent information for any area of interest, MANGLEE M1 generates an optical temporal composite employing S2 data for a user-specified temporal range and spatial extension. MANGLEE retrieves the optical data from the GEE “COPERNICUS/S2_SR_HARMONIZED” collection, which contains a harmonized time series of S2 Level-2A products. The term “harmonized” indicates that the spectral alignment of the dataset has been adjusted, removing the offset added to reflectance bands in the 04.00 processing baseline after January 24, 2022 (Google Earth Engine n.d.a). Worldwide coverage data are available from December 2018 (ESA n.d.a). Once the user sets the date and location of interest, all available images within the specified spatial and temporal ranges are selected.

To create the optical temporal composite free of clouds and cloud shadow pixels, a function adapted from the GEE Community is applied. This function identifies clouds from the probability dataset and removes shadows by intersecting non-water pixels with dark pixels. First, non-water pixels are selected by calculating the Modified Normalized Water Difference Index (MNDWI), which has values ranging from − 1 to 1. Values greater than zero correspond to water bodies. Next, dark pixels are obtained by applying an NIR band threshold of 0.15. The intersection of dark pixels with cloud shadows is identified, and those pixels are removed.

A series of indices are calculated and added as individual bands to each image to enhance the discrimination of mangroves from other land cover types. Among these indices, we selected specific ones that have been previously tested for the identification of mangroves, such as MMRI (Diniz et al. 2019) and MVI (Huang et al. 2022). Additionally, the tool calculates more general vegetation indices such as NDVI (Akbar et al. 2020), EVI (Zhang et al. 2016), SAVI (Pham et al. 2020), and GCVI (Hickey and Radford 2022). Considering the tidal conditions of the mangrove swamp, MANGLEE also calculates water indices such as NDWI, MNDWI (Hu et al. 2020), and the moisture index NDMI (Zhang et al. 2016). To fully leverage the potential of all spectral bands, we further computed indices such as Normalized Different Red Edge (NDRE) (Muhsoni 2018), NDII (Ji et al. 2011), Simple R (Hickey and Radford 2022), ratio SWIR-NIR (SN) (Vogelmann 1990), ratio NIR- SWIR (NS), and ratio RED- SWIR (RS). A temporal median value for each band and index is computed from the pixels retrieved within the specified period and free of clouds and shadows to build the temporal composite. Finally, the composite bands are clipped to the shape of the study area. The resulting composite is resampled to 10-m resolution and saved in the user’s GEE account. This process allows users to build temporal composites for any range of dates, according to their specific requirements.

SAR Data Preparation

To achieve consistent information from SAR data, M1 generates a temporal composite of Sentinel-1 data stored in the “COPERNICUS/S1_GRD” collection. The S1 acquisition mode over land adopts the Interferometric Wide (IW) configuration with VV and VH polarizations, and the GRD data represent backscatter intensity values stored in 10 × 10-m pixels (Google Earth Engine, n.d.b). The data preparation and compositing process involve applying cumulative selective filters to the data collection based on user-defined criteria, followed by the calculation of the per pixel median value. Initially, the SAR data collection is filtered based on date and area of interest. Subsequently, the resulting data is filtered based on the ascending or descending character of the orbit. Next, SAR values are converted to linear units, and raw intensity data is transformed into SAR indices.

Prior studies have shown that these indices are more effective than raw intensity data for vegetation identification (Simard 2019). The ratio (R) of VV over VH polarizations, along with the Radar Forest Degradation Index (RFVI) and Radar Vegetation Index (RVI) (Saatchi 2019), is computed. Following the calculation of indices, the SAR temporal composite is created by determining the median value per pixel. Then, the composite is clipped to the study area to adjust computing resources. To further refine the SAR data and reduce noise, enhancing the quality of the final composite, a smoothing morphological operator is applied. Upon completing the SAR data preparation and compositing process, the resulting temporal composite is saved in the user’s GEE account.

MANGLEE Module 2 (M2): Classification and Validation of Results

Random Forest Classification

MANGLEE M2 applies per pixel classification and generates mangrove maps. It takes as input the composites obtained in M1 and other user input data. Upon entering the path to the files, MANGLEE creates a stack of bands. Subsequently, the algorithm utilizes the training points in a specific file to retrieve values from each band, which serve as inputs to the RF classifier. The RF operates on a set-based learning principle, constructing subtrees using training samples randomly selected at each node (Breiman 2001). MANGLEE uses 100 trees by default. The decision forest then consolidates the classification from all the trees in the forest, following the idea that an ensemble of classifiers yields superior results compared to a single classifier (Parmar et al. 2019).

The user can choose as input to the RF any number of bands from Table 1. MANGLEE will perform the classification on the selected stack. The output of the classification is a raster layer with pixels classified into two categories: Mangrove and No-Mangrove, providing a spatially complete representation of mangrove distribution.

Table 1 Initial input variables employed in the classification

MANGLEE offers comprehensive insights into the classification process, providing users with detailed information to enhance their understanding. One of the informative features is a graph that depicts the relative importance value of each band in the classification. This graph displays the extent to which each band influences and contributes to the classification outcome.

Validation of Results

Validation is a crucial step in assessing the quality of remote sensing products resulting from image classification, as it provides essential information about the accuracy and uncertainty of results (Foody 2002; Chaaban et al. 2022). The validation process involves evaluating satellite-derived products independently and quantifying their accuracy by comparing them analytically with a reference (Camacho Olmedo et al. 2022). A primary analysis method used in validation is cross-tabulation, where two datasets are intersected to analyze their spatial correlation. This analysis yields an error or confusion matrix, which indicates whether the two datasets share the same values at specific locations and, if not, the relationships established between different values. From this matrix, various metrics such as overall accuracy, user accuracy, and producer accuracy can be derived (Congalton 1991). In the case of MANGLEE M2, the validation process is incorporated to answer the question, “How good is my mangrove map?”. After the classification process, MANGLEE M2 assesses the uncertainty of its products by comparing the classified images mangrove and non-mangrove values with a validation file that is assumed to represent ground truth data. The validation sample size was determined following Chuvieco (2020) recommendations. The algorithm extracts values from the classified image and compares them with the validation file. Subsequently, MANGLEE calculates the confusion matrix (Fig. 2) and derives the overall accuracy, user accuracy, and producer accuracy metrics.

Fig. 2
figure 2

Representation of the confusion matrix

Refinement of Classification Results

Land cover in mangrove areas can be heterogeneous, with mangrove cover often adjacent to other types of vegetation, such as agriculture fields, water bodies, or shrimp farms. The presence of these diverse covers can lead to confusion in the classification process, especially when dealing with wetlands, rice fields, and other types of forest, as they might exhibit similar backscatter or reflectance properties. To minimize classification errors caused by spectral confusion with neighboring covers and scattered points outside the actual mangrove zone, MANGLEE M2 implements majority filters. This filtering technique replaces cells in the raster based on most of their contiguous neighboring cells, thereby enhancing the classification accuracy. Furthermore, the algorithm reclassifies single pixels considering its neighboring pixel class. Pixels with less than four neighbors of the same class are removed, contributing to the overall reduction of classification errors. Finally, the results are exported with 10-m resolution into the user’s GEE account.

MANGLEE Module 3 (M3): Change Detection

To detect changes in mangrove areas, two mangrove maps are required. In MANGLEE M3, after entering the paths of the previously created mangrove maps using the earlier modules, MANGLEE performs a process of subtraction, comparing the cover maps pixel by pixel to generate a map depicting detected changes. Subsequently, MANGLEE applies a filter to eliminate single-pixel change and retain only changes equal to or greater than 0.5 ha (50 pixels). Despite MANGLEE’s capacity to yield changes at a finer scale, the map is adjusted to this minimum of 0.5 ha, aligning with the FAO’s definition of forest area. Finally, the results of classification and change detection are presented in a viewer, allowing users to visualize and analyze the distribution at different dates and the detected changes in the mangrove areas.

Testing MANGLEE

Case Study

To assess the performance of MANGLEE, we conducted a study in the Guayas estuary, located in southern Ecuador (Fig. 3). Encompassing an extensive area of 1091 km2, this region is renowned for its rich mangrove ecosystems along the Pacific coast. The climate is tropical, characterized by two distinct seasons: a rainy period from December to May, followed by a dry season from June to November. Average temperatures in Guayas range from 20 to 28 °C, with annual rainfall varying between 1200 and 1800 mm (Urquizo et al. 2011). The Guayas estuary is home to diverse mangrove forests, representing 68% of Ecuador’s total mangrove cover (Carvajal and Santillán 2019). The distribution of tree species follows a salinity tolerance gradient, with red mangroves (Rhizophora mangle L., Rhizophora racemosa G. Mey, and Rhizophora harrisonii Leechm) located at the most saline edge, followed by black mangrove (Avicennia germinans L.), white mangrove (Laguncularia racemosa (L.) C.F. Gaertn.), and finally the mangrove jeli (Conocarpus erectus L.) situated at the least saline extreme (Cornejo and Morales 2013). Approximately 32% of the study area is designated as legally protected regions, including areas recognized as wetlands of international importance under the Ramsar Convention. These protected zones strictly prohibit any habitat alteration or exploitation of natural resources.

Fig. 3
figure 3

Location of the Guayas mangrove (Ecuador). a Overall location in South America. b Footprints of S1 relative orbits and indication of annual observations (2018–2022) available per pixel. c Footprints of S2 tiles and indication of annual observations (2018–2022) available per pixel. d Distribution of shrimp farms and protected mangrove areas

In Ecuador, approximately 23% of the total mangrove area was lost between 1969 and 2013, with the Guayas province experiencing an 11% decrease in coverage over the last 50 years. This loss was primarily due to indiscriminate logging for shrimp farming ponds (Fig. 3) (Carvajal and Santillán 2019). Mangrove ecosystems in Guayas face multiple threats, including urban transformation, agricultural expansion, and aquaculture pressures. These alterations often lead to conflicts with local communities, as their economy, food security, and livelihoods heavily depend on mangrove products. Despite various efforts to address these environmental and social conflicts (López-Rodríguez 2021), systematic implementation has been lacking, resulting in many initiatives failing, or being diluted due to insufficient monitoring and control by local authorities (Worthington and Spalding 2018). Therefore, it is crucial to establish sustainable management strategies and strengthen monitoring practices to preserve the mangrove ecosystems and their role in supporting both the environment and local communities. The Guayas estuary, with its diverse mangrove ecosystems and protected areas, presents an ideal test bed for evaluating MANGLEE’s performance in accurately classifying and detecting changes in mangrove habitats.

Importance of S1 and S2 Data Availability

Frequent mapping and monitoring of mangrove forests are crucial, given their constant changes, and to support sustainable management and legal actions against illegal activities. The effectiveness of MANGLEE in monitoring extensive areas depends on the availability of S1 and S2 data, which may vary across different regions. To assess the temporal limitations of MANGLEE in the Guayas estuary, we conducted a comprehensive analysis of the quality and availability of S1 and S2 data. The pilot study area is covered by four Sentinel-2 tiles identified as 17MPS, 17MPT, 17MNS, and 17MNS (Fig. 3c). During the 2018–2022 period, 2364 S2 images were acquired over this area. More than 65% of them are 50–100% cloud-covered, highlighting the need to work with temporal composites to spatially cover the entire area of interest. To evaluate the monthly availability of S2 L2A data with 0% cloud coverage probability, we selected pixels from individual images that met this criterion. The monthly availability was then determined by aggregating the number of pixels meeting the 0% cloud probability, into a monthly image. By combining monthly availability images, we calculated the annual availability, which revealed areas with limited good-quality pixels and those with a higher number of acquisitions meeting the 0% cloud probability criterion. The average number of annual observations for the period 2018–2022 is displayed in Fig. 3c. Additionally, to assess data availability under different cloud probability conditions, we repeated the analysis with increased cloud probabilities of 10% and 30%. This analysis enabled us to identify the time interval necessary to build up a cloud-free spatially complete composite for mapping mangroves. The spatial location of cloud-free pixels varies over time, causing the monthly data to cover the study area just partially. To fully cover the study area with good-quality data, images from December to March are required, indicating that S2 data may enable an annual monitoring frequency in the study area.

By combining monthly availability images, we calculated the annual availability, which revealed areas with limited good-quality pixels and those with a higher number of acquisitions meeting the 0% cloud probability criterion. The average number of annual observations for the period 2018–2022 is displayed in Fig. 3c. Additionally, to assess data availability under different cloud probability conditions, we repeated the analysis with increased cloud probabilities of 10% and 30%. This analysis enabled us to identify the time interval necessary to build up a cloud-free spatially complete composite for mapping mangroves. The spatial location of cloud-free pixels varies over time, causing the monthly data to cover the study area just partially. To fully cover the study area with good-quality data, images from December to March are required, indicating that S2 data may enable an annual monitoring frequency in the study area.

In the case of S1, unlike S2, it has the capacity to acquire good-quality data even under cloudy conditions. The availability of observations depends on the number of passes and the overlapping of orbits, which are modified over time according to the priorities of the satellite acquisition plan. Relative orbit 91 in ascending mode covers most of the area of interest regularly, with up to 4 acquisitions per month during the period 2018–2022, whereas relative orbits 40 and 18 in ascending mode eventually cover some of the area extent. S1 monthly and annual availability were calculated by cumulatively aggregating available pixels until the entire pilot area was fully covered. This approach helped us identify areas with the highest S1 data availability in the test area of Guayas and during the 2018–2022 period of analysis (Fig. 3b). As a result, and despite the sole operation of S1A, monitoring mangroves in Guayas with SAR data could be done bimonthly, or even monthly in some areas.

Auxiliary Reference Data

To precisely delineate the study area and acquire essential training data, a diverse range of cartographic sources were consulted (Table 2). Complementing these sources, NICFI-Planet mosaics were integrated as a supplementary resource. This integration enhances the database with a comprehensive array of geospatial information, thereby augmenting the accuracy in defining the geospatial context of our study.

Table 2 Sources of data employed to train and validate MANGLEE

Results

Running: MANGLEE Module 1

In its first module, MANGLEE prepares the optical and SAR data for subsequent mapping. To obtain annual cartography, the target reference date was the 31st of December. Our aim was, therefore, to build up an optical composite with observations as close as possible to this date. This process was facilitated by our previous analysis. In this area, the GEE “COPERNICUS/S2_SR_HARMONIZED” collection lacks atmospherically corrected L2A data during the year 2018. To obtain L2A products, the MANGLEE script was adapted ad hoc to include the SIAC atmospheric correction (Yin et al. 2022). The 2020 and 2022 S2 composites were obtained with the standard code in MANGLEE M1. The 2018 and 2020 S2 composites were constructed with data from March to December, and the 2022 composite required data from January to December. To build the S1 SAR composites for 2018 and 2020, data from September to December were utilized. For the 2022 S1 SAR composite, data from November and December were selected. The composites were stored in the GEE user account and are identified with an AssetID.

To facilitate building the vector training dataset without registration errors to the spectral data, S2 composites were exported from GEE to a local computer. The training file was therefore built in a Geographic Information System (GIS). Two hundred mangrove class points (M) and 200 non-mangrove class points (NM) were retrieved employing local and global cartography from reference data (Table 2) and with the visual support of the S2 composites displayed in R: B8, G: B11, and B: B4. The validation sample size was calculated as recommended by Chuvieco (2020). For an expected accuracy of 95% and an acceptable error of 4% due to product scale, the number of sample pixels in each class was established as 115. The validation file was created from a random sampling. A stratified random sampling was designed with two sets of 115 points characterized as Mangrove and Non-Mangrove. Due to the difficulty in accessing the mangrove zone, these points were visually selected over the Planet’s biannual mosaics (https://www.planet.com/), which have high (5 m) spatial resolution (Planet Team 2017).

Running: MANGLEE Module 2

In its second module, MANGLEE classifies and maps mangroves. Once the composites (S1 and S2) and vector (training and validation) files were routed, M2 was run for each target year. We tried classifying with three different sets of input data, that is, S1 alone, S2 alone, and S1 + S2 combined, to investigate which set was more informative. Based on the results shown by the inputs importance graphic provided by the RF algorithm, the optical data, particularly the SWIR (B12-B11) and NIR (B8) bands, contributed more to the classification. Among the SAR inputs, VV polarization intensity was the most relevant. Our initial results revealed that the S1 alone classification categorized infrastructure and other vegetation cover as mangroves in agreement with other studies (Cárdenas et al. 2017). This issue was addressed by including an infrastructure mask created from the VH band. In addition, at the initial stages, MANGLEE confused some wetlands, rice crops, and other forests with mangroves, due to the spectral similarity.

A fieldwork campaign conducted in March 2023 helped us understand these issues and enrich the training with 50 samples collected across difficult land cover areas. Modifications were made to 44 points in the original training set, and 6 more of the “non-mangrove” class were included. In total, the final training file has 406 points. Our fieldwork also helped verify false negatives classified as water in intertidal areas, and in locations where mangrove intermingles in small patches with other forest types. Furthermore, our groundwork helped us realize how mangrove species show spectral differences according to environmental conditions (Kuenzer et al. 2011). The classification algorithm was run again after these modifications. With the enhanced training file, the updated S2 alone classification achieved an overall accuracy of over 95%, the S1 alone classification had an overall accuracy of 92%, and the S1 + S2 combined classification achieved an overall accuracy of over 97%. User and producer accuracy for both mangler and non-mangrove classes were in the 89–99% range with the lower values achieved by the S1 alone classification. The final mangrove map was exported out of GEE, and the number of pixels was counted to assess the total mangrove area per year. The estimated area of mangrove forest in the province of Guayas was 102,287 ha in 2018, which progressively decreased to 100,323 ha and 100,254 ha by 2020 and 2022, respectively.

Running MANGLEE Module 3

In its third module, MANGLEE evaluates the mangrove area changed between two dates. In Guayas, M3 was applied for two consecutive periods, that is, 2018–2020 and 2020–2022. The path of the initial and final dates cover maps obtained with M2 were introduced in M3. MAGLEE M3 then mapped and compared mangrove extents and produced a change map for each period. By default, in change analysis, only areas bigger than half a hectare are considered. In Guayas, M3 identified two types of change: mangrove loss and recovery.

M3 results for the period 2018–2020 exhibited a loss of 1966 ha of mangrove and a recovery of 714 ha. Focusing on protected areas, the loss and recovery accounted for 819 ha and 227 ha, respectively. During the 2020–2022 period, 999 ha were lost (549 in protected areas), and 524 ha recovered (21 ha in protected areas) (Fig. 4).

Fig. 4
figure 4

Examples of changes detected by MANGLEE (yellow line, change 2018–2020; blue line, change 2020–2018). a Change from mangrove to shrimp farm (42 ha). b Change from mangrove to bare soil (32 ha). c Mangrove loss due to shrimp farm maintenance: 11 ha in 2020 and 15 ha in 2022

To validate the change results, two expert interpreters conducted a thorough visual analysis of 20% of the polygons identified as changes by the MANGLEE algorithm. These interpreters examined each polygon and assigned them to one of four categories based on variations in vegetation: total loss, partial loss, gain, or uncertain. The interpreters found themselves unable to assign any label to 35% of the change polygons in the 2018–2020 dataset and 15% of those in the 2020–2022 dataset, underscoring the complexity of some areas. During the initial evaluation period, there was an 89% concurrence between MANGLEE’s results and the visual interpretations for losses and a 57% agreement for gains. In the subsequent period, this agreement between the two methods increased, reaching 82% for losses and 96% for gain.

Discussion

MANGLEE is a cloud-based tool developed within the Google Earth Engine (GEE) platform, specifically designed to advance global mangrove mapping and monitoring efforts. MANGLEE combines high spatial resolution optical and Synthetic Aperture Radar (SAR) data from the Copernicus program with a robust machine learning classification algorithm. MANGLEE comprises three distinct and autonomous modules that perform specialized functions: data preparation, image classification, and change assessment. This modular approach offers users great versatility. Remarkably, while MANGLEE’s primary mission was to monitor mangroves, it has demonstrated its adaptability for mapping various other land cover types. MANGLEE’s effectiveness was initially validated through testing in Guayas, Ecuador, where it delivered precise results for mangrove monitoring during the 2018–2022 period, providing a comprehensive and detailed understanding of the mangrove situation. Furthermore, it underwent evaluations in diverse South American mangrove regions, consistently achieving accuracy rates exceeding 95% when compared to ground-level field data. Notably, it has also successfully mapped dragon fruit cultivation in Palora, Ecuador (available at: https://www.maaproject.org/2023/cultivos-pitahaya-fruta-dragon-ecuador/). These achievements underscore the tool’s versatility, user-friendliness, and overall suitability for application across varying ecosystems.

The integration of SAR and optical data within MANGLEE capitalizes on the strengths of both data types. While merging optical and SAR data can be challenging due to the differences in imaging mechanisms (Li et al. 2022), their combined use in land cover classification and change detection has proven highly effective for identifying and monitoring mangroves. This synergy has previously been observed in other land cover studies (Sujud et al. 2021) and highlights the value of combining information from Copernicus programs. Optical data, synthesized through biochemical vegetation indices, provides insights into the chlorophyll and water status of mangrove canopies (Zeng et al. 2022). In contrast, C-band SAR data offers crucial canopy structural information, particularly useful for identifying evergreen vegetation types. MANGLEE’s ability to work with SAR data is especially valuable in regions where cloud cover is persistent, such as tropical and subtropical areas where mangroves thrive. SAR data’s capability to acquire high-quality information even in the presence of clouds enables an increase in the monitoring frequency. In case study in Ecuador, we demonstrated how Sentinel-1 acquisition frequency allowed for bimonthly monitoring from 2018 to 2022, despite the unfortunate loss of one of the companion twin satellites in 2021 (Copernicus Data Space n.d.). In the future, the repositioning of the twin constellation is expected to improve global data frequency, further enhancing mapping revisit capacity. MANGLEE even offers the option to map mangroves exclusively based on SAR data, provided a base map is available. Overall, the temporal frequency of data acquisition provided by the Copernicus missions represents a significant improvement over previous satellite missions like Landsat or ALOS. Utilizing these datasets enabled MANGLEE to enhance the spatial resolution of the Global Mangrove Watch mangrove maps from 20 to 10 m, as well as the temporal frequency of the Google Earth Engine Mangrove Mapping Methodology. This enhanced mapping resolution aids in identifying small-scale disturbances, such as the expansion of the aquaculture industry, which is gradually encroaching on mangrove habitats in Ecuador due to economic factors.

The lack of success or failure in mangrove restoration efforts stems from the absence of standardized monitoring protocols, resource constraints, limited technical capacity, and insufficient data integration between projects (Worthington and Spalding 2018). In developing countries, there is a concerted effort to address this issue through the implementation of remote sensing training programs. However, the sustained effectiveness of these initiatives is impeded by the transient nature of technicians within public institutions, coupled with technological limitations (Haack and Ryerson 2016; Jha and Chowdary 2007). MANGLEE avoids the economic issues associated with the purchase of software and hardware by being available through GitHub (https://github.com/SERVIR-Amazonia/MANGLEE) GNU General Public License, and to address these training challenges. MANGLEE has been designed to be as intuitive as possible, featuring a simplified processing flowchart that maximizes the data utilization of abundant data through image composites in GEE. Its aim is to be accessible to users who may be non-experts in remote sensing tools or programming, positioning itself as a practical tool for consulting and management. The effective monitoring of mangroves through remote sensing faces a significant challenge related to data availability. MANGLEE heavily relies on Sentinel data, presenting a potential vulnerability highlighted by the setback experienced in 2022 with the loss of Sentinel-1B. Such incidents can jeopardize the continuity of monitoring efforts. To mitigate this, it is crucial for future research to diversify data sources, including incorporating alternatives like ALOS-2 PALSAR-2 for SAR data and NICFI-Planet for optical data. Introducing backup sources enhances the resilience of the monitoring system. To further enhance spatial resolution, integrating MANGLEE with high-resolution satellite or drone imagery could be beneficial. This integration would enable a more detailed analysis of mangrove ecosystems. Additionally, given the demonstrated success of remote sensing in assessing changes in various environments such as grasslands, corals, and estuaries, there is a promising avenue for research to explore and validate MANGLEE’s capabilities in monitoring other marine ecosystems. Expanding its applicability beyond mangroves could contribute to a comprehensive understanding of diverse marine environments.

Conclusions

MANGLEE stands out as a user-friendly, accessible, adaptable, and highly effective tool, dedicated to bolstering coastal management efforts. Leveraging the robust cloud computing capabilities of Google Earth Engine and utilizing accessible data from the Copernicus program, MANGLEE has demonstrated its prowess in monitoring mangroves, even overcoming persistent cloud cover challenges. This has resulted in the generation of invaluable insights for change detection. Our assessment of MANGLEE over the Guayas estuary, a renowned mangrove region in Ecuador, has underscored the tool’s reliability in providing detailed identification of changes between 2018 and 2022. To further enhance the temporal monitoring capacity, future research endeavors should prioritize the enrichment of the Synthetic Aperture Radar (SAR) monitoring approach, since at least in tropical regions, it has much higher availability of good quality data than optical counterparts. SAR applicability should aim to extend to other mangrove areas worldwide, as well as to other ecosystems where monitoring with optical data is hindered by the persistence of cloud coverage.

MANGLEE emerges as a key asset in our pursuit of sustainable practices and well-informed decision-making, not confined solely to mangrove ecosystems but extending its relevance across diverse environments. Its adaptability and effectiveness position MANGLEE as a key ally in advancing our understanding of ecological changes and fostering responsible resource management.