Mangrove Ecosystem Mapping Using Sentinel-1 and Sentinel-2 Satellite Images and Random Forest Algorithm in Google Earth Engine

: Mangroves are among the most productive ecosystems in existence, with many ecological beneﬁts. Therefore, generating accurate thematic maps from mangrove ecosystems is crucial for protecting, conserving, and reforestation planning for these valuable natural resources. In this paper, Sentinel-1 and Sentinel-2 satellite images were used in synergy to produce a detailed mangrove ecosystem map of the Hara protected area, Qeshm, Iran, at 10 m spatial resolution within the Google Earth Engine (GEE) cloud computing platform. In this regard, 86 Sentinel-1 and 41 Sentinel-2 data, acquired in 2019, were employed to generate seasonal optical and synthetic aperture radar (SAR) features. Afterward, seasonal features were inserted into a pixel-based random forest (RF) classiﬁer, resulting in an accurate mangrove ecosystem map with average overall accuracy (OA) and Kappa coefﬁcient (KC) of 93.23% and 0.92, respectively, wherein all classes (except aerial roots) achieved high producer and user accuracies of over 90%. Furthermore, comprehensive quantitative and qualitative assessments were performed to investigate the robustness of the proposed approach, and the accurate and stable results achieved through cross-validation and consistency checks conﬁrmed its robustness and applicability. It was revealed that seasonal features and the integration of multi-source remote sensing data contributed towards obtaining a more reliable mangrove ecosystem map. The proposed approach relies on a straightforward yet effective workﬂow for mangrove ecosystem mapping, with a high rate of automation that can be easily implemented for frequent and precise mapping in other parts of the world. Overall, the proposed workﬂow can further improve the conservation and sustainable management of these valuable natural resources.


Introduction
Mangroves are unique ecosystems that grow along tropical and sub-tropical coastlines. They provide many ecological benefits, including coastal protection, carbon sequestration, and waste and pollution assimilation [1][2][3][4][5]. Despite their significant environmental services, mangroves continue to disappear due to anthropogenic activities and climate change [6,7]. For instance, over the last five decades, approximately 20-30% of global mangroves have disappeared due to various phenomena, such as urban expansion, conversion to aquaculture, sea-level rise, and sediment alterations [8][9][10][11][12][13]. Therefore, accurate spatial and temporal mapping and monitoring of mangrove ecosystems are crucial for natural resource conservation and sustainable development goals [14].
In situ observations provide the most accurate information about mangroves. However, collecting in situ observations through field surveys is challenging, due to the limited accessibility of mangrove communities, as they are located in harsh and tidally inundated environments [15]. Therefore, remote sensing has been recognized as an efficient and cost-effective approach for mapping mangroves [16].
In this regard, multi-spectral [17][18][19], hyperspectral [20], light detection and ranging (LIDAR) [21], and synthetic aperture radar (SAR) [22] datasets have been utilized for mangrove studies. For instance, Manna and Raychaudhuri [23] examined the potential of Sentinel-2 images for mangrove mapping in Sunderban, India. Moreover, Zhu et al. [21] employed unmanned aerial vehicle (UAV) optical and LIDAR data to map mangroveinundation patterns in Fujian, China. Furthermore, Kabiri [24] utilized RGB images, acquired by UAV, to classify the coastal ecosystem of Nayband Bay, Iran, into five classes of mangrove, shallow water, deep water, vegetation, and sand. The ortho-images and reference samples were fed to a maximum likelihood classifier to fulfill this task, producing a land cover map with an OA of 87.6%. Likewise, Toosi et al. [25] investigated the suitability of combining Sentinel-2 and WordView-2 images to produce a mangrove ecosystem map with eight classes. An upscaling approach in three stages was applied to produce a wall-towall land cover map based on a single-date Sentinel-2 image, resulting in the OA and Kappa coefficient (KC) of 65.5% and 0.63, respectively. The incorporation of single-date satellite imagery along with few reference samples were two limiting factors of their research, leading to moderate accuracy.
Most conducted studies on mangroves using remote sensing data have implemented traditional approaches on local computers, requiring manual acquiring, correcting, and processing of satellite images. Therefore, Cárdenas et al. [26] encouraged scholars to employ cloud-computing platforms, such as Google Earth Engine (GEE), making mangrove mapping more efficient [27,28]. This platform enables the automation of repetitive tasks (e.g., image acquisition, calibrating, and processing) and, thus, decreasing the dedicated time up to 60% [26].
GEE is a cloud platform enabling high-performance computing capabilities for geospatial data processing [29,30]. GEE hosts petabytes of satellite images, which have been efficiently employed in a variety of Earth science-related studies, such as land cover mapping [31][32][33], monitoring of volcanic thermal anomalies [34], monitoring of forest health [35,36], and wildfire damage assessment [37]. This cloud platform was also used in several mangrove studies, especially mangrove extent mapping [8,15,[38][39][40]. For example, Mondal et al. [39] combined annual downscaled Sentinel-2 images and two machine learning algorithms of random forest (RF) and classification and regression trees (CART) within GEE for mangrove extent mapping along the coasts of Senegal and Gambia. The final mangrove extent maps of RF and CART had average OAs of about 93.44% and 92.18%, respectively. Furthermore, Sentinel-1 and Sentinel-2 data were employed in conjunction to produce a 10 m-resolution mangrove extent map of China [15]. In this regard, quantile synthesis features derived from both datasets were applied to an RF classifier using both pixel-based and object-based approaches. Finally, the classification results were improved by the constraint of tidal flats and visual manipulations. It was reported that the pixel-based approach obtained a higher OA, of approximately 95%, based on two-class (i.e., mangroves and non-mangroves) mapping.
Almost all of the mangrove-related studies within GEE, to the best of our knowledge, were dedicated to mangrove extent mapping [8,15,[39][40][41] and, thus, the potential of this cloud platform for detailed mangrove ecosystem mapping was not fully explored. Additionally, other studies that were carried out to map a detailed mangrove ecosystem implemented traditional approaches on local computers using a few satellite observations [23,25]. Therefore, in this study, the GEE cloud computing platform was integrated with open-access satellite images to produce a detailed mangrove ecosystem map, ad-vancing conservation and sustainable management of these valuable ecosystems through a higher automation level. The proposed approach uses an uncomplicated yet effective framework, allowing a consistent mangrove ecosystem mapping workflow for monitoring and assessment purposes. In this regard, the objectives of the present study are summarized as (1) incorporating multi-source images of Sentinel-1 and Sentinel-2 for accurate mangrove ecosystem mapping within GEE through an efficient and reproducible workflow, and (2) employing dense seasonal time-series observations to alleviate the tidal effect for more accurate mapping without any further tidal refinements. The robustness of the proposed method was then examined through cross-validation and consistency analyses. Furthermore, the contribution of multi-source remote sensing data and seasonal observations were also investigated.

Study Area
The study area covers the mangrove ecosystem in the Hara protected area of Qeshm Island, southern Iran (see Figure 1), which is under protection by different international conventions [42]. It is approximately centered at latitude and longitude of 26 • 50 N and 55 • 44 E, respectively, between the northwest estuaries of Qeshm Island and Hormozgan province. This area is the largest mangrove ecosystem in the Persian Gulf and Oman Sea coasts [43]. The study area includes grooved tidal channels, wherein tides are semi-diurnal. Furthermore, this region is affected by considerable tidal fluctuations, which necessitate taking the tidal effect into account for accurate mangrove mapping. There are generally two mangrove species, Avicennia marina and Rhizophora mucronata, in the Persian Gulf, the dominant of which is Avicennia marina, which grows in oxygen-poor sediments [44,45]. The local community uses this mangrove ecosystem for fishing, leaf-cutting, and regular boat journeys (i.e., tourism), which have negatively impacted the ecosystem, suggesting the necessity of frequent monitoring for conservation and natural resource management. Additionally, due to its proximity to the Strait of Hormuz, through which a large number of oil tankers pass, this area is also adversely impacted by oil leakage [46]. open-access satellite images to produce a detailed mangrove ecosystem map, advancing conservation and sustainable management of these valuable ecosystems through a higher automation level. The proposed approach uses an uncomplicated yet effective framework, allowing a consistent mangrove ecosystem mapping workflow for monitoring and assessment purposes. In this regard, the objectives of the present study are summarized as (1) incorporating multi-source images of Sentinel-1 and Sentinel-2 for accurate mangrove ecosystem mapping within GEE through an efficient and reproducible workflow, and (2) employing dense seasonal time-series observations to alleviate the tidal effect for more accurate mapping without any further tidal refinements. The robustness of the proposed method was then examined through cross-validation and consistency analyses. Furthermore, the contribution of multi-source remote sensing data and seasonal observations were also investigated.

Study Area
The study area covers the mangrove ecosystem in the Hara protected area of Qeshm Island, southern Iran (see Figure 1), which is under protection by different international conventions [42]. It is approximately centered at latitude and longitude of 26° 50′ N and 55° 44′ E, respectively, between the northwest estuaries of Qeshm Island and Hormozgan province. This area is the largest mangrove ecosystem in the Persian Gulf and Oman Sea coasts [43]. The study area includes grooved tidal channels, wherein tides are semi-diurnal. Furthermore, this region is affected by considerable tidal fluctuations, which necessitate taking the tidal effect into account for accurate mangrove mapping. There are generally two mangrove species, Avicennia marina and Rhizophora mucronata, in the Persian Gulf, the dominant of which is Avicennia marina, which grows in oxygen-poor sediments [44,45]. The local community uses this mangrove ecosystem for fishing, leaf-cutting, and regular boat journeys (i.e., tourism), which have negatively impacted the ecosystem, suggesting the necessity of frequent monitoring for conservation and natural resource management. Additionally, due to its proximity to the Strait of Hormuz, through which a large number of oil tankers pass, this area is also adversely impacted by oil leakage [46].  Table 1).  Table 1).

Datasets
In this section, the datasets employed for mangrove ecosystem mapping are explained. First, a description of the collection and preparation of reference samples is provided, and then the Sentinel-1 and Sentinel-2 satellite datasets are described.

Reference Samples
In this study, precise visual interpretation depended on collecting reference samples from high-resolution satellite images available in ArcMap and Google Earth. Additionally, false-color composite satellite imagery and previous mangrove ecosystem maps were used. Homogenous sites were considered for reference sample collection to mitigate the challenge of mixed pixels by avoiding fragmented areas. In total, nine classes with adequate (i.e., in terms of land cover portion in the study area and possible complexity) reference samples and appropriate spatial distribution (i.e., distributed over the study area) were generated (see Figure 1). Reference samples were then randomly split into two groups of training (50%) and test (50%) samples. Random splitting leads to low bias in the performance of the final classification results [47]. However, the primary challenge of random sampling is the information leak between training and test samples [48]. In other words, random sampling at pixel unit causes the training and test datasets to include reference samples from the same polygons. This issue increases the spatial autocorrelation between training and test datasets, which affects the accuracy assessment results and decreases the generality of the classifier [49]. Therefore, to avoid this, the random splitting step was conducted at the polygon unit, which also spatially disjointed the training and test samples. It should be mentioned that the random splitting step was implemented ten times to enable applying a cross-validation procedure for performance evaluation, which can also prove the applicability and robustness of the proposed method for accurate and detailed mangrove ecosystem mapping [39]. Table 1 provides the number of training and test polygons (i.e., the average value in ten iterations) and their corresponding area. In total, 265 and 264 training and test polygons with an area of about 125.22 ha and 130.38 ha were generated, respectively.

Satellite Images
The time-series Sentinel-1 and Sentinel-2 satellite images were integrated to produce an accurate mangrove ecosystem map. Combining SAR and optical data allows the detection of different physical and spectral characteristics of land covers and, thus, their integration may achieve precise classification results [50][51][52]. Additionally, time-series data enables consideration of the water level fluctuations and tidal effects in the mangrove ecosystem, which can also increase the reliability of the classification results [53].
Sentinel-1 is a European SAR satellite, which acquires C-band data in dual-polarization in all-weather conditions with a 6-day temporal resolution. Level-1C ground range detected (GRD) images with 10 m spatial resolution in both ascending and descending modes were employed [54,55]. In total, 86 Sentinel-1 scenes in the VV (vertical transmittance and receiving) and VH (vertical transmittance and horizontal receiving) polarizations, acquired in 2019 (i.e., from 1 January 2019 to 1 January 2020), were employed (see Table 2).
Sentinel-2 is also a European platform launched by the European Space Agency (ESA) and carries the MultiSpectral Instrument (MSI) sensor [54]. This sensor records the Earth's surface information in 13 spectral bands from visible to shortwave infrared (SWIR) regions, with different spatial resolutions ranging between 10 m and 60 m. In this study, only four bands of blue, green, red, and near infrared (NIR), which are captured with 10 m spatial resolution, were used. As it is acknowledged that satellite imagery with higher spatial resolutions improves mangrove ecosystem mapping, [25], here, only bands with 10 m spatial resolution were employed. This is mainly rooted in the fact that higher spatial resolution imagery improves the delineation of mangrove ecosystem classes, especially identifying mangrove patches with a small area or narrow shapes [56]. In total, 41 Sentinel-2 images, acquired in 2019 (i.e., from 1 January 2019 to 1 January 2020), were considered for mangrove ecosystem mapping (see Table 2).

Methodology
The schematic framework, providing an overview of the proposed approach, is presented in Figure 2. This section comprises three sub-sections, in which the satellite data preprocessing, classification workflow, and accuracy assessment procedure are explained in detail.
Remote Sens. 2021, 13, x FOR PEER REVIEW 5 of 18 Sentinel-1 is a European SAR satellite, which acquires C-band data in dual-polarization in all-weather conditions with a 6-day temporal resolution. Level-1C ground range detected (GRD) images with 10 m spatial resolution in both ascending and descending modes were employed [54,55]. In total, 86 Sentinel-1 scenes in the VV (vertical transmittance and receiving) and VH (vertical transmittance and horizontal receiving) polarizations, acquired in 2019 (i.e., from 1 January 2019 to 1 January 2020), were employed (see Table 2).
Sentinel-2 is also a European platform launched by the European Space Agency (ESA) and carries the MultiSpectral Instrument (MSI) sensor [54]. This sensor records the Earth's surface information in 13 spectral bands from visible to shortwave infrared (SWIR) regions, with different spatial resolutions ranging between 10 m and 60 m. In this study, only four bands of blue, green, red, and near infrared (NIR), which are captured with 10 m spatial resolution, were used. As it is acknowledged that satellite imagery with higher spatial resolutions improves mangrove ecosystem mapping, [25], here, only bands with 10 m spatial resolution were employed. This is mainly rooted in the fact that higher spatial resolution imagery improves the delineation of mangrove ecosystem classes, especially identifying mangrove patches with a small area or narrow shapes [56]. In total, 41 Sentinel-2 images, acquired in 2019 (i.e., from 1 January 2019 to 1 January 2020), were considered for mangrove ecosystem mapping (see Table 2).

Methodology
The schematic framework, providing an overview of the proposed approach, is presented in Figure 2. This section comprises three sub-sections, in which the satellite data preprocessing, classification workflow, and accuracy assessment procedure are explained in detail.

Satellite Data Preprocessing
Sentinel-1 GRD data are available within GEE with the snippet of (Image Collection ID: COPERNUCUS/S1_GRD). They are generally ready-to-use data because several preprocessing steps are initially applied to them by the GEE developers. These data are already converted to the backscattering coefficient (σ • , dB) and are ortho-rectified. In particular, five preprocessing steps (1) applying orbit file correction, (2) GRD border noise removal, (3) thermal noise removal, (4) radiometric calibration, and (5) terrain correction were applied to each Sentinel-1 scene, while their detailed information is provided by the GEE developers (https://developers.google.com/earth-engine/guides/sentinel1 accessed on 29 June 2021). Afterward, all available Sentinel-1 scenes in 2019 were categorized based on the seasons of acquisition, followed by applying a mean reducer to generate seasonal time-series data. Downscaling time-series Sentinel-1 data by the mean reducer function produced seasonal datasets, which are less susceptible to image acquisition conditions, and reduced speckle noise [31].
Sentinel-2 top of atmosphere (TOA) reflectance data, which are available within GEE by the snippet (Image Collection ID: COPERNICUS/S2), were also used in this study. The TOA reflectance values were derived through radiometric calibration of raw data. Because of the importance of applying cloud masking, a filtering step was first implemented to remove Sentinel-2 scenes with a cloud cover percentage of higher than 5%. Subsequently, similar to Sentinel-1 data, a seasonal median reducer was applied to all remaining Sentinel-2 scenes, generating seasonal optical features for classification tasks. The median reducer function allows the production of cloud-free seasonal datasets, in which the noisy, very dark, and very bright pixels are also removed [31,57].
Ultimately, eight SAR features (4 VV + 4 VH) and 16 optical features (4 blue + 4 green + 4 red + 4 NIR bands) were used in synergy to produce mangrove ecosystem maps. It is well acknowledged that the quality of the classification results directly depends on the input features [58,59]. As such, the integration of multi-source (i.e., SAR + optical) data can increase the discriminative capability of the classifier [53]. Moreover, time-series satellite data can manifest the water level fluctuations in estuaries, such as mangrove ecosystems [53]. Consequently, seasonal datasets can mitigate the tidal effects in the study area and allow producing cloud-free mosaics.

Classification
Different classification algorithms have been employed for mangrove mapping using satellite images [23,39,60]. In this regard, choosing the most appropriate classifier, in addition to selecting discriminative features, is important, and directly affects the classification results. Among classifiers, random forest (RF) proved to be an efficient algorithm in mangrove mapping studies [15,44,61]. For instance, Toosi et al. [44] compared four frequently used non-parametric classifiers (i.e., RF, support vector machine (SVM) with linear and radial basis function kernels, and regularized discriminant analysis) for mangrove ecosystem mapping, and concluded that the RF classifier was superior.
RF is an authoritative non-parametric classifier, which employs the bootstrap aggregation technique to combine the classification results of various independent random decision trees and to predict the class label [62]. Each of these random decision trees is trained by a subset of training samples, called in-bag samples, and uses the remnant, called out-of-bag samples, for internal cross-validation. Later, their results are integrated to produce the final classification results. This enables the RF classifier to have a higher tolerance for noise, and also avoids overfitting possibilities [63,64]. Moreover, RF has proven its capability of handling high-dimensional data by resulting in promising maps [31].
In this study, a pixel-based RF classifier was implemented within GEE because of the high potential of the RF classifier for mangrove ecosystem mapping [15,44,61]. In this regard, the final image mosaics, comprising seasonal Sentinel-1 and Sentinel-2 data, were inserted into an RF classifier. Meanwhile, half of the reference samples were employed to train the RF classifier. The RF classifier has several tuning parameters that affect the training phase of the classification step and, thus, directly influence the classification results. Among these parameters, the number of trees and variables at each node are the most influential parameters [63], which were set at 100 and equal to the square root of the number of input features, respectively. It should be noted that these values were determined through several trial and error attempts based on computational efficacy, visual inspection of the classification results, and the average out-of-bag sampling error of the RF classifier in the training phase.

Accuracy Assessment
Any thematic map derived from remote sensing data should be subjected to a trustworthy accuracy assessment to ensure its quality and reliability [65]. Therefore, both visual interpretation and statistical approaches were conducted to evaluate the accuracy of the final mangrove ecosystem map. High-resolution satellite images available within Google Earth and ArcMap were employed for visual assessment of the classification results. In terms of statistical accuracy assessment, independent test samples were incorporated to generate the confusion matrix, and then other metrics, such as OA, KC, producer accuracy (PA), and user accuracy (UA), were derived. The PA represents how well a specific area can be mapped, whereas the UA is an indicator of how well the produced map represents what really exists in the study area [66]. Furthermore, the F-score, the harmonic average of recall and precision, was computed for each class, and then its macro-averaging was reported for the classification results [67]. As already mentioned in Section 2.2.1, the classification procedure was repeated ten times with different training and test sets to comprehensively assess the classification performance for mangrove ecosystem mapping through a cross-validation step. Figure 3 presents the resulting mangrove ecosystem map (i.e., only classes within the mangrove ecosystem) with 10 m spatial resolution using RF classifier and the integration of seasonal SAR and optical satellite data within GEE. It should be noted that this map was produced based on a majority voting step of ten classification results. The majority voting step allows the production of a more reliable and accurate mangrove ecosystem map [68]. This is rooted in the fact that combining decisions of several classification results can lead to better recognition results [69]. Visually, the thematic map had an acceptable accuracy, indicating the high potential of the proposed method for delineating different classes. Generally, mangrove areas were depicted precisely, and their surroundings were also classified as aerial roots, as these roots grow around mangroves. Furthermore, the middle parts of the tidal channels were correctly classified as deep water, while other parts located near the coastline areas (i.e., tidal zone) were successfully distinguished as shallow water. Additionally, along with their corresponding high-resolution satellite images, two zoomed-in areas are also provided in Figure 3 for better visual interpretation. For instance, Figure 3b,c illustrates a zoomed-in area of the mangrove ecosystem, in which the mangrove areas are successfully identified. Moreover, based on Figure 3d,e, the proposed workflow was highly capable of discriminating between different classes with acceptable precision. In particular, mangrove areas and their surroundings (i.e., aerial roots) were properly discriminated, and also shallow water, deep water, and tidal zone classes were delineated appropriately. Furthermore, other areas without specific covers, which are wet (due to the existence of narrow water channels), were also accurately classified as mudflat. The consistency images of six classes within the mangrove ecosystem were also computed based on the classification results of ten iterations to determine the robustness of the proposed classification procedure and the consistency of each pixel. It should be noted that the consistency images were produced based on the number of label assignments of each pixel to different classes. In other words, the consistency images present how many times a pixel was assigned to a specific class. The consistency values ranged between one and ten, in which one means very low consistency, while ten means highly consistent. Figure 4 shows the consistency images of six classes within the mangrove ecosystem. It was observed that in almost all cases, the classifier was able to assign consistent labels to each pixel in ten iterations. In particular, mangrove pixels were consistently labeled as mangrove with a high consistency rate of over 85% (i.e., considering pixels with values of eight to ten). Additionally, the tidal zone, deep water, and mudflat classes achieved reasonable rates of stability of over 70%. In contrast, the classes of shallow water and aerial roots obtained lower stability rates. In general, most inconsistencies occurred at boundaries and fragmented locations, where mixed pixels exist, suggesting the necessity of satellite images with a higher spatial resolution for more accurate mapping. For instance, the aerial roots had the highest rate of inconsistency of about 13% (i.e., considering pixels with values of one). This is probably rooted in the fact that these roots grow around mangrove areas and in mudflat conditions, and thus, the classifier may encounter difficulties in distinguishing them. This was more serious in distinguishing aerial roots from mudflat. Furthermore, another source of inconsistency was found between the shallow water and deep water classes, which is in fact associated with their greater similarity. The inconsistency revealed the effect of different training sets and also implied that incorporating the majority voting step could increase the reliability of the final thematic map. each pixel to different classes. In other words, the consistency images present how many times a pixel was assigned to a specific class. The consistency values ranged between one and ten, in which one means very low consistency, while ten means highly consistent. Figure 4 shows the consistency images of six classes within the mangrove ecosystem. It was observed that in almost all cases, the classifier was able to assign consistent labels to each pixel in ten iterations. In particular, mangrove pixels were consistently labeled as mangrove with a high consistency rate of over 85% (i.e., considering pixels with values of eight to ten). Additionally, the tidal zone, deep water, and mudflat classes achieved reasonable rates of stability of over 70%. In contrast, the classes of shallow water and aerial roots obtained lower stability rates. In general, most inconsistencies occurred at boundaries and fragmented locations, where mixed pixels exist, suggesting the necessity of satellite images with a higher spatial resolution for more accurate mapping. For instance, the aerial roots had the highest rate of inconsistency of about 13% (i.e., considering pixels with values of one). This is probably rooted in the fact that these roots grow around mangrove areas and in mudflat conditions, and thus, the classifier may encounter difficulties in distinguishing them. This was more serious in distinguishing aerial roots from mudflat. Furthermore, another source of inconsistency was found between the shallow water and deep water classes, which is in fact associated with their greater similarity. The inconsistency revealed the effect of different training sets and also implied that incorporating the majority voting step could increase the reliability of the final thematic map.  Figure 5 presents the average values of PA and UA along with their standard deviation computed for ten iterations of producing mangrove ecosystem maps. The proposed classification framework obtained high average OA, KC, and F-scores of 93.23% (±1.1), 0.92 (±0.012), and 0.92 (±0.011), respectively. Furthermore, almost all classes achieved high PAs and UAs of over 90%, demonstrating the high potential and applicability of the proposed method for detailed mangrove ecosystem mapping. It is evident that the mangrove classes obtained significant average PA and UA of about 94.4% and 94.5%, indicating the applicability of the implemented approach for accurate mangrove delineation. In fact, the results proved that the proposed approach can not only be used for detailed mangrove ecosystem mapping but also can be effectively employed for accurate mangrove extent mapping. The highest and lowest accuracies were related to deep water and aerial roots, respectively. The aerial roots acquired moderate average PA and UA of approximately  the results proved that the proposed approach can not only be used for detailed mangrove ecosystem mapping but also can be effectively employed for accurate mangrove extent mapping. The highest and lowest accuracies were related to deep water and aerial roots, respectively. The aerial roots acquired moderate average PA and UA of approximately 77.6% and 78.2%, respectively, illustrating the challenging task of delineating aerial roots with high accuracy, which is also in accordance with [25]. Furthermore, Figure 5 demonstrates that the proposed approach obtained stable PAs and UAs in all ten iterations, since their standard deviation values ranged between 1.6% and 3.8% for all classes, except for the aerial roots, for which the standard deviation of PAs and UAs were 7.4% and 5.9%, respectively.

Results
Remote Sens. 2021, 13, x FOR PEER REVIEW 9 of 18 77.6% and 78.2%, respectively, illustrating the challenging task of delineating aerial roots with high accuracy, which is also in accordance with [25]. Furthermore, Figure 5 demonstrates that the proposed approach obtained stable PAs and UAs in all ten iterations, since their standard deviation values ranged between 1.6% and 3.8% for all classes, except for the aerial roots, for which the standard deviation of PAs and UAs were 7.4% and 5.9%, respectively.  The confusion matrices of the classifications were also investigated, to provide an indepth statistical assessment in each iteration (see Figure 6). Generally, the proposed approach obtained acceptable accuracy since less confusion happened between classes, and confusion matrices were almost diagonal. However, there are several spots where some confusions are observable in Figure 6, such as the confusion between deep water and shallow water, which occurred in all iterations. Additionally, relatively high confusions were also found between aerial roots and other classes of mangrove and mudflat, which were 77.6% and 78.2%, respectively, illustrating the challenging task of delineating aerial roots with high accuracy, which is also in accordance with [25]. Furthermore, Figure 5 demonstrates that the proposed approach obtained stable PAs and UAs in all ten iterations, since their standard deviation values ranged between 1.6% and 3.8% for all classes, except for the aerial roots, for which the standard deviation of PAs and UAs were 7.4% and 5.9%, respectively.  The confusion matrices of the classifications were also investigated, to provide an indepth statistical assessment in each iteration (see Figure 6). Generally, the proposed approach obtained acceptable accuracy since less confusion happened between classes, and confusion matrices were almost diagonal. However, there are several spots where some confusions are observable in Figure 6, such as the confusion between deep water and shallow water, which occurred in all iterations. Additionally, relatively high confusions were The confusion matrices of the classifications were also investigated, to provide an in-depth statistical assessment in each iteration (see Figure 6). Generally, the proposed approach obtained acceptable accuracy since less confusion happened between classes, and confusion matrices were almost diagonal. However, there are several spots where some confusions are observable in Figure 6, such as the confusion between deep water and shallow water, which occurred in all iterations. Additionally, relatively high confusions were also found between aerial roots and other classes of mangrove and mudflat, which were the reasons for the moderate accuracy of aerial roots.
Remote Sens. 2021, 13, x FOR PEER REVIEW 11 of 18 Figure 6. Confusion matrices of mangrove ecosystem maps for ten iterations.

General Findings
Mangrove ecosystems are routinely inundated and are located in inter-tidal zones [21]. Therefore, it is difficult to carry out field surveys to collect reference samples with global positioning system (GPS) devices [15]. The availability of highly accurate reference samples through field surveys is critical for reliable mapping; however, precise visual interpretation of high-resolution satellite images can compensate for this limitation. The An average confusion matrix (i.e., by averaging and rounding of the corresponding elements in 10 confusion matrices) is also provided in Table 3 to provide a comprehensive overview of all ten confusion matrices at a glance. Table 3 shows that the proposed approach obtained high average OA and KC values of 93.23% and 0.92, respectively, indicating the high potential of this approach for detailed mangrove ecosystem mapping. Moreover, the average omission error (OE) and commission error (CE) values were respectively 7.56% and 7.18%. The dominant confusion was associated with the aerial roots class, causing the highest OE and CE values of 23.06% and 21.92%, respectively, which are also in accordance with [25]. In particular, the two highest confusions occurred interchangeably between aerial roots/mudflat and aerial roots/mangrove. This was because these roots are grown in mudflat areas, exactly around mangroves. Therefore, it was challenging to separate aerial roots from two other classes due to the spectral/backscattering similarities and also the existence of mixed pixels at 10 m spatial resolution. Additionally, the second highest confusion was also observed between deep water and shallow water, which was actually because of their spectral/backscattering similarity. Table 3. Average confusion matrix of mangrove ecosystem mapping using the random forest (RF) algorithm and a combination of the Sentinel-1 and Sentinel-2 satellite images processed within the Google Earth Engine (GEE) platform.

Mangrove
Tidal

General Findings
Mangrove ecosystems are routinely inundated and are located in inter-tidal zones [21]. Therefore, it is difficult to carry out field surveys to collect reference samples with global positioning system (GPS) devices [15]. The availability of highly accurate reference samples through field surveys is critical for reliable mapping; however, precise visual interpretation of high-resolution satellite images can compensate for this limitation. The proposed method was able to achieve high average OA and KC values, suggesting the suitability of applying this method when conducting fieldwork is difficult. It should be noted that generating reference samples even from high-resolution satellite imagery through precise visual interpretations can cause uncertainties and does not obviate the importance of in situ reference sample collection for more reliable mapping.
Despite the importance of mapping the mangrove extents, which have been conducted more frequently using either traditional or cloud computing-based approaches, fewer studies were devoted to producing detailed mangrove ecosystem maps. However, mapping relevant classes within a mangrove ecosystem (i.e., aerial roots and mudflat) is required to enhance condition assessment and also to suggest appropriate solutions for protection and conservation [25]. In particular, mapping the distribution and condition of aerial roots are highly required for mangrove status monitoring since these roots provide different morphological and physiological adaptions to adverse environmental conditions [70]. For instance, these roots facilitate gas exchange to adapt mangroves to live in oxygen-poor locations [71], protect mangroves from flood effects and hurricanes [70], and mitigate shoreline erosion to prevent mangrove loss [72]. Furthermore, these roots support mangrove growth and accretion by stabilizing mudflat conditions [71,73]. Therefore, obtaining precise information about aerial roots helps to conduct more profound monitoring of mangroves and also to determine the locations for efficient reforestation programs.
In this study, the GEE cloud computing platform was employed for mangrove ecosystem mapping. GEE provides an unprecedented opportunity to employ dense time-series data from free-of-charge satellite images, and also it contains many built-in machine learning and image processing algorithms for satellite data manipulations [29,30]. Furthermore, the existence of ready-to-use data, along with other characteristics, contributes towards developing efficient methods with higher rates of automation and, thus, decreases the dedicated time for data acquisition, calibrating, and preprocessing [26]. Despite these advantages, GEE also has several limitations, such as restrictions on using numerous features and training samples (i.e., encountering limit exceed), which were also addressed in previous studies [32].

Comparison with the Latest Global Mangrove Maps
The obtained results indicated the high applicability of the proposed method for mangrove ecosystem mapping and also mangrove extent delineation. Therefore, the mangrove extent derived from the proposed method was compared with the recent available global mangrove extent map [74]. This global mangrove map was produced at 25 m (0.8 arc-second) spatial resolution using multi-source remote sensing data of the Advanced Land Observation Satellite (ALOS) Phased-Array L-band SAR (PALSAR) and optical data of Landsat-5 and Landsat-7 through an Extremely Randomized Trees (ERT) classifier [74]. Figure 7 presents the mangrove extent resultants of two products, along with the corresponding high-resolution satellite images for better visualization. Based on Figure 7, it is obvious that the proposed approach outperformed the global mangrove product. Clearly, based on Figure 7a-c, the proposed method was resistant to misclassification, probably of mudflat and aerial roots (i.e., generally unvegetated areas between mangrove patches). Likewise, Figure 7d-f also illustrates that the proposed method was successful at delineating narrow mangrove patches which occurred along the tidal zone areas. Despite the subtle differences in the classification algorithms and the considered classes in each workflow, the main discrepancies between the two maps were almost associated with the spatial resolution of remote sensing satellite data, which suggests the use of Sentinel-1 and Sentinel-2 data. Therefore, the synergistic use of Sentinel-1 and Sentinel-2 can definitely enhance the recent global mangrove extent mapping [53]. Although the utility of 10 m spatial resolution indeed enhanced the mangrove extent mapping, as the results suggest, it is still necessary to use satellite images with a higher spatial resolution to permit the production of more precise detailed mangrove ecosystem maps. This is rooted in the fact that higher spatial resolutions are necessary to discriminate between different classes that are located near each other, and to reduce the mixed pixel effect, such as separating aerial roots from two other classes of mangrove and mudflat. However, the current high cost of acquiring commercial high-resolution images is the main limiting factor. Remote Sens. 2021, 13, x FOR PEER REVIEW 13 of 18 Figure 7. High-resolution satellite images of two mangrove areas (a,d), mangrove extents from the recent global mangrove map (b,e) [74], and mangrove extents derived from the proposed method (c,f).

Contribution of Multi-Source Remote Sensing Data
As mentioned earlier, the Sentinel-1 SAR and Sentinel-2 optical data were combined to produce an accurate mangrove ecosystem map. It has been well acknowledged that a combination of optical and SAR remote sensing data could enhance the classification results of land cover mapping [75]. However, few studies have combined optical and SAR data for detailed mangrove ecosystem mapping, and they were mainly conducted based on optical data [25,76]. Therefore, here, the contribution of multi-source remote sensing data for detailed mangrove ecosystem mapping was evaluated based on two metrics of OA and KC. In this regard, the explained workflow (Section 3) was repeated with two other scenarios of using only optical or SAR data. The obtained results for the multi-source data processing were comprehensively discussed in the previous section, and the average OA and KC were 93.23% and 0.92, respectively. The average OA and KC achieved for the scenario, in which only optical data were incorporated, were 90.67% and 0.89, respectively. Although the accuracies based on the optical data were still satisfactory, the decline in the accuracies indicates the contribution of multi-source remote sensing data for more  [74], and mangrove extents derived from the proposed method (c,f).

Contribution of Multi-Source Remote Sensing Data
As mentioned earlier, the Sentinel-1 SAR and Sentinel-2 optical data were combined to produce an accurate mangrove ecosystem map. It has been well acknowledged that a combination of optical and SAR remote sensing data could enhance the classification results of land cover mapping [75]. However, few studies have combined optical and SAR data for detailed mangrove ecosystem mapping, and they were mainly conducted based on optical data [25,76]. Therefore, here, the contribution of multi-source remote sensing data for detailed mangrove ecosystem mapping was evaluated based on two metrics of OA and KC. In this regard, the explained workflow (Section 3) was repeated with two other scenarios of using only optical or SAR data. The obtained results for the multi-source data processing were comprehensively discussed in the previous section, and the average OA and KC were 93.23% and 0.92, respectively. The average OA and KC achieved for the scenario, in which only optical data were incorporated, were 90.67% and 0.89, respectively.
Although the accuracies based on the optical data were still satisfactory, the decline in the accuracies indicates the contribution of multi-source remote sensing data for more accurate mangrove ecosystem mapping. In particular, the use of only optical data resulted in over 1.5% (i.e., averaged over ten iterations) loss of class accuracies of each tidal zone, deep water, shallow water, and mudflat classes. Additionally, the results using only SAR data revealed a weak performance (i.e., OA = 62.98% and KC = 0.58); however, the SAR data was successful at delineating mangrove areas with a high accuracy of over 90% in almost all iterations. When using only SAR data, the lower accuracy was mainly associated with the low capability of separating different classes (i.e., except mangrove) within the mangrove ecosystem, with an average loss of 31.94% in class accuracies. The obtained results suggest that the inclusion of SAR data in the classification task, along with optical data, leads to producing a precise and accurate mangrove ecosystem map. This is mainly due to the fact that these two data sources can provide complementary information about the spectral and physical properties of different classes [77,78].

Comparison with Annual Downscaling
The seasonal downscaling approach was implemented for mangrove ecosystem mapping. In fact, the dense time-series SAR and optical data, acquired in 2019, were downscaled to seasonal features for further analysis. This approach takes the benefits of multi-temporal image analysis, as well as reducing the computational complexity of considering all available images without downscaling. Furthermore, since the mangrove ecosystems are routinely located in the inter-tidal zone and are inundated [21], the classifier may be influenced by the inundation intensity [79], biasing the mangrove extent and area. One solution is to use a single date image, in which the lowest tidal condition occurred; however, finding an image with such criteria may be challenging for several reasons, such as the presence of cloud and low temporal resolution of satellites. Therefore, it is recommended to apply time-series data to acquire more reliable classification results. In this study, seasonal features were used; however, other researchers applied annual downscaling for mangrove mapping [39]. Consequently, the usefulness of seasonal downscaling is compared with the annual downscaling approach. In this regard, the mentioned workflow was also applied to annual downscaled SAR and optical data, and the obtained results were compared with the seasonal approach. As is clear from Figure 8, incorporating seasonal downscaling achieved higher OAs and KCs in all iterations and, thus, it suggests that the seasonal downscaling can provide more discriminative information compared to annual downscaling [80]. This may be rooted in the fact that annual downscaling would override the tidal fluctuations, while the seasonal downscaling includes seasonal variations of water level (i.e., dry and wet seasons), reflecting tidal fluctuations [78]. accurate mangrove ecosystem mapping. In particular, the use of only optical data resulted in over 1.5% (i.e., averaged over ten iterations) loss of class accuracies of each tidal zone, deep water, shallow water, and mudflat classes. Additionally, the results using only SAR data revealed a weak performance (i.e., OA = 62.98% and KC = 0.58); however, the SAR data was successful at delineating mangrove areas with a high accuracy of over 90% in almost all iterations. When using only SAR data, the lower accuracy was mainly associated with the low capability of separating different classes (i.e., except mangrove) within the mangrove ecosystem, with an average loss of 31.94% in class accuracies. The obtained results suggest that the inclusion of SAR data in the classification task, along with optical data, leads to producing a precise and accurate mangrove ecosystem map. This is mainly due to the fact that these two data sources can provide complementary information about the spectral and physical properties of different classes [77,78].

Comparison with Annual Downscaling
The seasonal downscaling approach was implemented for mangrove ecosystem mapping. In fact, the dense time-series SAR and optical data, acquired in 2019, were downscaled to seasonal features for further analysis. This approach takes the benefits of multi-temporal image analysis, as well as reducing the computational complexity of considering all available images without downscaling. Furthermore, since the mangrove ecosystems are routinely located in the inter-tidal zone and are inundated [21], the classifier may be influenced by the inundation intensity [79], biasing the mangrove extent and area. One solution is to use a single date image, in which the lowest tidal condition occurred; however, finding an image with such criteria may be challenging for several reasons, such as the presence of cloud and low temporal resolution of satellites. Therefore, it is recommended to apply time-series data to acquire more reliable classification results. In this study, seasonal features were used; however, other researchers applied annual downscaling for mangrove mapping [39]. Consequently, the usefulness of seasonal downscaling is compared with the annual downscaling approach. In this regard, the mentioned workflow was also applied to annual downscaled SAR and optical data, and the obtained results were compared with the seasonal approach. As is clear from Figure 8, incorporating seasonal downscaling achieved higher OAs and KCs in all iterations and, thus, it suggests that the seasonal downscaling can provide more discriminative information compared to annual downscaling [80]. This may be rooted in the fact that annual downscaling would override the tidal fluctuations, while the seasonal downscaling includes seasonal variations of water level (i.e., dry and wet seasons), reflecting tidal fluctuations [78].

Conclusions
Producing detailed mangrove ecosystem maps is essential for natural resource monitoring and sustainable development goals tracking. In this paper, a straightforward yet robust workflow was proposed to produce mangrove ecosystem maps with high accuracies. For this purpose, Sentinel-1 and Sentinel-2 data were inserted into an RF classifier within the GEE cloud computing platform. The final classification results were comprehensively evaluated through different analyses, and further discussions were provided. The classification results obtained high average OA and KC of 93.23% and 0.92, respectively. Moreover, all the classes obtained high accuracies, except the aerial roots, which achieved moderate accuracies in all cases, suggesting the consideration of other possible solutions (i.e., higher resolution images) for more accurate delineation of this class. Altogether, taking both qualitative (i.e., visual interpretation) and quantitative (i.e., statistical accuracy assessment) evaluation criteria into account, the proposed method confirmed its applicability in producing a detailed mangrove ecosystem map. Furthermore, the comparison results proved the contribution of multi-source remote sensing data (i.e., SAR + optical), as well as the effectiveness of seasonal downscaling. The proposed workflow was implemented based on an open-source platform and free-of-charge satellite data, making it appealing and applicable in almost all countries. Data Availability Statement: The produced mangrove ecosystem map using Sentinel-1, Sentinel-2, and Random Forest algorithm and the derived mangrove extent map are available upon request from the first author.