Introduction

Mangroves are valuable ecosystems that provide multiple benefits for humans and nature, such as coastal protection, biodiversity conservation, and livelihood support (Menéndez et al. 2020). Moreover, they act as a carbon sink that can sequester carbon dioxide (CO2) in the soil underneath at higher rates per hectare than tropical forests (Omar et al. 2019; Maurya et al. 2021). Although mangrove occupies less than 0.5% of the global marine environment, they sequester around 13% of the total carbon stored by the coastal ecosystem (Alongi 2014). Therefore, several studies have proved the effectiveness of mangroves as a natural climate solution that contributes to decreasing climate change impacts (Murdiyarso et al. 2015; Macreadie et al. 2021). Mangroves’ growth can be affected by several factors, namely, climatic conditions, geomorphological location, salinity, and human interventions (Irsadi et al. 2019; Rastogi et al. 2021; Afefe 2021). However, mangroves are also threatened by various factors, such as climate change, sea level rise, land use change, pollution, and overexploitation (Afefe 2021; Mosa et al. 2022; Bhowmik et al. 2022). In addition, hydrological processes and climatic factors including precipitation and temperature can change the composition and distribution of mangroves as they control mangrove nutrients and coastal hydrodynamics (Eslami-Andargoli et al. 2009; Moslehi et al. 2021).

Recognizing the importance of the mangrove ecosystem and the problems it faces that caused its declination, it is important to monitor and understand the dynamics and drivers of mangrove distribution and change at different spatial and temporal scales. Unfortunately, it is challenging to quantify the rate of disappearance or increase of mangrove trees, as most of the areas are logistically difficult to access or located in remote locations, besides the high cost of field surveying, which is also time-consuming. In addition, having historical information regarding the previous mangrove areas to aid in the monitoring process is also challenging. Therefore, effective mapping approaches are required, which can take place using remote sensing techniques. Remote sensing is a powerful tool for mapping and monitoring crops and vegetation across different spatial and temporal scales. Many mangrove ecosystem studies have employed multi-spectral satellite data to determine spatiotemporal change (Khairuddin et al. 2016; Fernando and Senanayake 2023). The same strategy can be used to monitor mangrove vegetation as remote sensing can help assess the status and distribution of mangroves at local and global scales (Hu et al. 2020). Mangroves in Egypt are an untapped area of research, there is a knowledge gap when it comes to mapping mangroves extent and identifying its growth factors. The Red Sea is one of the most saline and arid regions in the world, where mangroves face harsh environmental conditions and limited freshwater inputs. Despite their ecological and socio-economic importance, there is a lack of comprehensive and up-to-date information on the status and trends of mangroves along the Red Sea shoreline in Egypt. Several studies have mostly examined the current spatial distribution of mangroves (Saleh 2007; Blanco-Sacristán et al. 2022), their physical and chemical characteristics (Afefe et al. 2019), and their relation to sea levels (Gilman et al. 2007), however, they overlooked the hydrological and climatic factors. Furthermore, to the best of our knowledge, no published work has historically monitored the change in mangroves in Egypt.

This paper uses satellite imagery and GIS techniques to fill these gaps by conducting a spatiotemporal analysis of mangrove distribution and change along the Red Sea shoreline in Egypt. The study further explores the influence of rainfall and runoff, two prominent hydrological variables recognized for their potential impact on mangrove growth, employing statistical methodologies. Despite constituting a relatively small fraction of the global mangrove ecosystem, Egyptian mangroves play a significant role in mitigating atmospheric carbon dioxide levels and bestowing various ecological advantages. Therefore, this paper provides novel insights into the patterns and processes of mangrove dynamics in this region and contributes to the understanding of the role of freshwater availability on mangrove resilience.

Materials and methods

Study area

Geographically, mangroves in Egypt are dominantly present in two regions: the Sinai Peninsula and the Red Sea coast. This research focuses on the mangroves located along the western shore of the Red Sea, which covers most of the mangrove ecosystem in Egypt. The length of study area covers 650 km of the Red Sea shoreline between latitudes (27°13′5.58″N and 22°41′29.01″N) and longitudes (33°52′17.61″E and 36° 1′3.96″E) from Hurghada to Halayeb within the Red Sea Governorate as illustrated in Fig. 1. The water temperature along the shoreline ranges between 18 and 32.5 °C according to the season, while the salinity varies between 40 and 42.42% (Abdelmongy et al. 2015). Mangroves in Egypt are dominant in two species: Avicennia Marina (A. Marina) and Rhizophora Mucronate (R. Mucronate). The first species is the most common along the study location, while the second is mostly found towards the south of the shoreline within Wadi El Gemmal Protectorate and near the Egyptian-Sudanese border in Halayeb.

Fig. 1
figure 1

Study area location and boundary

Data acquisition

In this investigation, the preliminary identification of mangrove ecosystems and their spatial extents was accomplished through the analysis of multispectral imagery acquired from a suite of satellite sensors, specifically Landsat 5 Thematic Mapper (TM), Landsat 7 Enhanced Thematic Mapper Plus (ETM +), Landsat 8 Operational Land Imager (OLI)—sourced from the Earth Explorer portal (http://earthexplorer.usgs.gov/) facilitated by the United States Geological Survey (USGS)—and the Sentinel 2 Multi Spectral Imager (MSI), accessed via the Copernicus Open Access Hub (https://scihub.copernicus.eu). These datasets, procured for the year 2022, were selected for their absence of cloud obfuscation and were georeferenced to the Universal Transverse Mercator (UTM) projection system, zone 36 N, utilizing the World Geodetic System 1984 (WGS84) datum. The utility of multispectral (MS) bands in these images for the accurate delineation of mangrove areas has been corroborated by numerous studies (Ghorbanian et al. 2021; Wiatkowska et al. 2021) underscoring the efficacy of specific band combinations for the visual identification of these ecosystems.

To augment the resolution and accuracy of the vegetation analysis, this study also incorporated high-resolution imagery from the Google Earth Images, specifically Quickbird satellite images, spanning multiple years (2003, 2004, 2007, 2009, 2011, 2012, 2014, 2016, 2022) to facilitate a comprehensive multi-temporal assessment of mangrove coverage. The selection of these years was informed by the availability of high-resolution imagery (< 1 m) at the specified mangrove locations (Watanabe et al. 2020). This integrated methodological framework enabled the generation of a baseline mangrove map for 2022 and facilitated an in-depth temporal analysis of mangrove vegetation dynamics since 2003.

Mangrove delineation

In this study, we employed a two-phased approach to delineate and analyze temporal mangrove coverage. (I) a comparative evaluation was performed among Landsat 5, Landsat 7, Landsat 8, and Sentinel-2 imagery to ascertain the satellite offering the highest resolution and the finest detail for the preliminary identification of mangrove locales within the study perimeter in the year 2022. In this phase imagery from Sentinel-2, chosen for their proven effectiveness in vegetation detection due to their multispectral capabilities, including the crucial NIR band. This phase ensured the preliminary identification of mangrove extents with an accuracy validated by subsequent field visits. (II) The second phase involved the deployment of high-resolution Google Earth (Quickbird) imagery for detailed mapping and change detection. Despite Google Earth images’ limitation in multispectral data, their high-resolution detail (< 1 m) significantly improves the mapping accuracy of fragmented and small-sized mangroves along the Red Sea shoreline, a necessity not met by the coarser resolution of multispectral images., This methodological pivot was strategically chosen to complement the initial multispectral analysis, ensuring comprehensive coverage and precise quantification of mangrove changes over time. The integration of these datasets underpins our robust methodological framework, designed to balance the multispectral analysis’s breadth with the high-resolution imagery’s detailed inspection. A comprehensive flowchart detailing the applied methodology is presented in Fig. 2, providing a clear visualization of the steps undertaken to fulfill the research objectives.

Fig. 2
figure 2

Research methodology flowchart

Initial mangroves detection

In this study, we refined our data acquisition methodology to include a comparative resolution analysis of satellite imagery from Landsat (Landsat-5, Landsat-7, and Landsat-8) and Sentinel-2. This approach was chosen to leverage their multi-spectral capabilities and widespread application in remote sensing, particularly in land use and land cover mapping, and their effectiveness in identifying vegetation areas, such as mangroves (Ma et al. 2019; Wiatkowska et al. 2021). During the initial detection phase of mangroves for the base year 2022, Landsat-5 (30 m resolution) imagery was excluded from the study due to the satellite’s decommissioning in 2013, rendering its data outdated for current analysis (Zhang and Roy 2016). Similarly, Landsat-7 (30 m resolution) data was also omitted due to a well-documented sensor anomaly that compromises image quality, specifically the Scan Line Corrector (SLC) failure, which results in data misinterpretations (Hossain et al. 2015). In contrast, Landsat-8, with its capability for panchromatic sharpening that combines lower-resolution bands with high-resolution ones to create sharpened high-resolution images, offers imagery at a 15-m resolution (Rahaman et al. 2017). However, after detailed evaluation (Fig. 2), we determined that Sentinel-2’s imagery yields more precise results for our research objectives as it covers 13 spectral bands with a superior 10-m resolution and require less extensive image processing. Consequently, Sentinel-2 images were primarily utilized in our analysis. Figure 3 illustrates the comparative detail captured by each satellite’s imagery for a sample mangrove location, highlighting the rationale behind our choice of data sources. Upon enhancing the satellite to improve clarity and detail. Subsequently, the Normalized Difference Vegetation Index (NDVI), a robust analytical tool originally developed by Rouse et al. (1974), was employed to accurately identify and delineate vegetated zones along the shoreline. The NDVI is an established method for assessing the spatial distribution and density of plant life, leveraging spectral reflectance measurements to quantify vegetation greenness and vitality. The index is derived from the near-infrared (NIR) and red light reflected by vegetation, encapsulated in the formula:

$$ NDVI = \frac{NIR - Red}{{NIR + Red}}\;{\text{where }}\left( {0 \, < {\text{ NDVI }} < { 1}} \right) $$
(1)

where the NDVI values range between − 1 and + 1, with positive values indicating greater levels of vegetation biomass (Rouse et al. 1974). This study adheres to the standard NDVI threshold values to classify the vegetated areas, ensuring precise and reliable mapping of the green cover on the shoreline.

Fig. 3
figure 3

Comparison of satellite imagery detail for a mangrove sample, illustrating data selection logic. Sentinel-2 outperforms other multispectral satellites in accuracy, whereas Google Earth offers unparalleled detail, enhancing mangrove quantification and temporal analysis precision

*Detecting the change of mangroves was not performed for the same dates in all locations due to the availability of the high-resolution Google Earth Images (Resolution < 1 m). All 14 locations are monitored for the years 2007, 2011, 2016, and 2022, except for location 8 (2009, 2016, and 2022), location 11 (2004, 2012, and 2022), and location 12 (2003, 2014 and 2022).

Validation of mangrove locations

To validate the accuracy of our methodology, a comprehensive validation process was undertaken, which involved comparing our results with ground truth data and independent datasets. This validation process encompassed field surveys and reference data collection. The field surveys were conducted in March 2022, during which a thorough visit was made to confirm the precise locations of the mangrove trees. Additionally, any green areas containing vegetation types other than mangroves were excluded from the analysis. The coordinates of the confirmed locations were recorded using a handheld GPS device. By comparing our outputs with these reference datasets and incorporating the qualitative data gathered during the field survey, we assessed the accuracy of our analysis and implemented necessary adjustments to enhance the reliability of the results.

Detecting the change in mangrove spatial distribution using high-resolution Google Earth images

While our methodology allows for the precise identification of the mangrove locations in the Sentinel-2 imagery, the spatial distribution of mangroves was highly uncertain due to limitations associated with the resolution of these images (see Fig. 3). To rectify this, our methodology needed to pivot to allow for the most accurate delineation of the mangrove extents for the year 2022 and to map the changes over time, in addition to creating a detailed spatiotemporal representation. To address this, we augmented the methodology by integrating very high-resolution imagery from Google Earth, specifically the QuickBird satellite imagery, which has a spatial resolution of less than 1 m, and which has been available for the study area from 2003 to 2022. This allowed the creation of an accurate baseline map and comprehensive spatiotemporal analysis of the changes in mangrove areas. We obtained ninety (90) high-resolution images from Google Earth corresponding to the identified mangrove locations within the study domain for the years 2003–2022. The selection of 2003 is based on availability of high-resolution imagery for the study area. We downloaded the images from Google Earth Pro then used an open-source Software called El-Shayal Smart GIS to download Google Earth images with its geo-referenced information (Elshayal 2015). The images were then converted from a geographic coordinate system (latitude/longitude) to a projected coordinate system (northing/easting) using Universal Transverse Mercator (UTM) projection in ArcGIS10. In addition, Historical imagery from Google Earth Pro allowed for the tracking of mangrove distribution changes from 2003 to 2022 as there was no high-quality data available for the study area before 2003.

Rational behind satellite data selection

In the methodology section of the paper, it’s important to note that while Google Earth offers high-resolution imagery, it primarily provides images in three spectral bands: red, green, and blue (RGB). This RGB configuration significantly limits the use of Google Earth imagery for initial vegetation detection stages, as multispectral data, which include a broader range of wavelengths, are critical for accurately applying vegetation indices such as the Normalized Difference Vegetation Index (NDVI). The NDVI and similar indices rely on the near-infrared (NIR) band along with the red band to effectively differentiate between vegetated and non-vegetated areas, a capability that RGB imagery alone cannot provide (Hu et al. 2013). Therefore, our methodology initially avoided utilizing Google Earth imagery for primary vegetation detection due to its lack of multispectral capabilities, particularly the absence of the NIR band. Instead, we opted for satellite imagery from platforms like Landsat and Sentinel-2, which include both red and NIR bands among others, thus enabling the effective application of NDVI and other vegetation indices for the accurate identification of mangrove areas. Only after identifying potential vegetation areas with multispectral satellite imagery did, we employ Google Earth’s high-resolution RGB images for subsequent analysis, such as detailed mapping and change detection in identified mangrove locations. This approach ensures a more robust and accurate assessment of vegetation, leveraging the strengths of different types of satellite data in a complementary manner. In doing so, we make the process more accessible and understandable, without sacrificing precision, thereby facilitating a more inclusive engagement with satellite imagery analysis.

Training and validation data

In this study, we employed machine learning techniques to classify satellite images of the study area. Georeferenced images were subjected to supervised classification using ArcGIS tools. Specifically, we applied the Maximum Likelihood algorithm, which is based on the probability of a pixel belonging to a certain class. The NDVI was utilized as training samples for the classification process. To ensure accurate results, we conducted manual monitoring to address potential challenges such as noise, shadows, or mixed pixels. Any errors or misclassifications were rectified through the adjustment of class labels or reassigning pixels or segments to appropriate classes using the Reclassify tool in ArcGIS. To validate the accuracy of our methodology, a comprehensive validation process was undertaken. We cross-referenced our calculated mangrove areas with existing peer-reviewed literature that focused on the same geographic area and temporal context, which is a common practice for researchers in the field of remote sensing and vegetation analysis to compare their findings with existing literature to validate their results (Watanabe et al. 2020; Mullapudi et al. 2023). Additionally, we acknowledged the widespread use of Google Earth images as ancillary data in numerous publications for validation and collecting training samples in land use/cover classification (Pimple et al. 2018; Achour et al. 2018; Blanco-Sacristán et al. 2022). Finally, we performed a confusion matrix analysis to assess the classification errors and the accuracy measures of our methodology. A confusion matrix is a table that compares the actual and predicted land cover classes for a sample of pixels and calculates the overall accuracy, which is the proportion of pixels that are correctly classified.

Calculating the annual rate of change of mangrove

In this study, the yearly rate of change in the mangrove area was utilized to examine the variations between the mangrove areas at two distinct times in the same location. The compound interest approach was used to generate the following formula (FAO 2007), which represents the yearly rate of change in mangrove area (q):

$$ q = \left( {\frac{{A_{2} }}{{A_{1} }}} \right)^{{{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {\left( {t_{2} - t_{1} } \right)}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${\left( {t_{2} - t_{1} } \right)}$}}}} - 1 $$
(2)

where, A1 and A2 are mangrove areas at times t1 and t2, respectively.

Rainfall & runoff analysis

Most of the mangrove locations are distinguished by the existence of multiple watersheds that release rainfall to the Red Sea Shoreline (Fig. 4). Due to the influence of steep slopes and infrequent instances of heavy rainfall, the streams in these basins are characterized by their short length, however, they result in intense flow. Therefore, in this study we will focus on the rainfall patterns and the stream power as two hydrological factors that can affect its growth. Stream power, which is simply the sum of stream discharge, stream slope, and the weight of water, is a term used to describe surface runoff as a driving force behind certain flow patterns. Most scholars use stream power as a measure of fluvial geomorphic processes (Gartner 2016).

Fig. 4
figure 4

Some of the watersheds along the study area

Rainfall trend analysis

To identify the relationship between rainfall patterns and mangrove distribution, rainfall data between 2000 and 2020 were obtained for the study sites and their catchment areas from Integrated Multi-satellite Retrievals for GPM (GPM IMERG)—Final Run product Version 6, using the GIOVANNI web-based resource (https://giovanni.gsfc.nasa.gov/giovanni/). It provides monthly average precipitation rate estimates (in mm/month) with a spatial resolution of 0.1° (approximately 11 km). The final run product, that was used, is regarded as being of research-grade quality (Eslami-Andargoli et al. 2009) and was used in several studies in the same location (Elnazer et al. 2017; Ibrahim 2021). The rainfall trends were calculated using Sen’s slope method (Sen 1968) and linear regression, at different mangrove locations. The Sen’s slope method is used in many studies to detect trends in hydro-meteorological data (Jain et al. 2013; Bari et al. 2016). The slopes of all data pairs (Ti) are calculated by:

$$ T_{i} = \frac{{x_{j} - x_{k} }}{j - k} for i = 1, 2, .. N $$
(3)

where, xj and xk are rainfall data values at time j and k (j > k), respectively. The median of these N values of Ti is Sen’s estimator of slope, which is calculated as follows:

$$ \beta = \left\{ {\begin{array}{*{20}c} {\frac{{T_{N} + 1}}{2} , N is odd} \\ {\frac{1}{2}\left( {T_{\frac{N}{2}} + T_{{\frac{N + 2}{2}}} } \right), N is even} \\ \end{array} } \right. $$
(4)

An upward trend in the time series is indicated by a positive value of \(\beta \), whereas a downward (decreasing) trend is shown by a negative value. In addition, the linear regression is used to fit the rainfall time series and use the slope to measure the rainfall trend (Wickramagamage 2016; Rustum et al. 2017). The rainfall trends are then compared to the rate of change in mangrove vegetation at the same location to identify any relation.

Runoff analysis—stream power index (SPI)

The majority of studies on the environmental factors influencing vegetation have linked the plant distribution to the watershed-scale characteristics of upstream watersheds (Song et al. 2014; Gartner 2016). The analysis of the alluvial and hydrological consequences of the downstream, such as the transit of water pollutants, the quality of the water, the estimation of floods, and sedimentation, depends on accurate knowledge of the flood-plain flow. Stream power has a direct relation to sediment transport, runoff characteristics, and watershed features. It expresses the amount of energy contained in flowing water within a streamline per unit length. The stream power (Ω) (in units of Wm−1) (Tetford et al. 2017) of any stream is defined as:

$$ \Omega = \rho gQS $$
(5)

where, ρ is the water density, g is the gravitational acceleration, Q is the discharge and S is the channel gradient (dimensionless).

In our methodology, we derived the streamlines from the 30-m resolution Digital Elevation Model (DEM) provided by the United States Geological Survey (USGS) utilizing the Raster Calculator option in ArcGIS 10.3 software. This process involved delineating the watershed and extracting the stream network based on topographical data. Discharge (Q) was estimated at various points within the stream network using ArcGIS’s hydrological tools, which integrate rainfall-runoff models and historical flow data (Hassan et al. 2022). The channel gradient (S) was computed from the DEM by measuring the change in elevation over the distance along the stream, facilitated by the slope analysis tools in ArcGIS. This methodology aligns with well-established practices within the field, as documented in the works of Gartner (2016) and Ghunowa et al. (2021).(Gartner 2016; Ghunowa et al. 2021).

To investigate the correlation between the SPI and the average annual increase of mangroves, multiple statistical indicators were utilized to assess the strength and nature of the relationship at the same study locations. The employed indicators included the scatter plots for visual representation, the Coefficient of Determination (R2) to quantify the proportion of variance (higher values indicating stronger relationship), regression analysis with P-values (p < 0.005 considered statistically significant), the Correlation coefficient (R) where values closer to 1 denoted a stronger correlation and the coefficient of variation (CV) to quantify data variability as a percentage of the mean, offering insights into the degree of dispersion (Hassan et al. 2022).

Results and discussion

Mangroves temporal and spatial distribution

The mangroves are found on separate sites; they are scattered parallel to the shoreline. The total mangrove areas are summarized in fourteen (14) locations within the study area, as shown in Fig. 5, while the coordinates of all locations are summarized in Table 1. The Red Sea coast is dominated by a chain of high mountains that can reach heights up to 2 km, creating a series of flood plains and watersheds along the study area; most of the mangrove locations are found downstream these fluvial areas either in shallow waters, beach ridges or semi-enclosed areas like bays. There are other geomorphological forms where mangroves are found like offshore islands as the case in locations 1 and 2 or on inter-tidal flats, which are muddy and shallow areas that appear between the tide levels (Miththapala 2013), as for some parts in location 14. Figure 6 shows the different geomorphological formations along the Red Sea coast. The locations of the mangroves in Egypt agree with the geomorphological criteria where mangroves are usually suited; several studies stated that mangroves usually grow in shallow depths on the beaches, as well as locations that are not exposed to heavy wave action, such as bays, islands, or reefs (Afefe 2021).

Fig. 5
figure 5

Mangrove locations covered within the study area showing study locations by yellow squares

Table 1 Study sites’ locations coordinates
Fig. 6
figure 6

Three main geomorphological formations of mangroves in Egypt a Shows mangroves located on fluvial areas in shallow water and beach ridges b shows mangroves on offshore islands, c mangroves on inter-tidal flats

Monitoring the temporal mangrove changing rates has been done for the past 15 years, from 2007 to 2022, using high-resolution Google Earth Images. However, in the year 2007 images were available for only 11 mangrove locations. The remaining 3 locations that did not have 2007 images, had earlier or later dates. Kindly refer to the Fig. 2 description for detailed image availability at each location. Hence, to establish a consistent baseline year across all mangrove locations, we employed linear interpolation to estimate the mangrove area from the earliest available image for locations 8, 11, and 12, projecting it to the year 2007. Although the linear method is simple, it is an effective method for estimating missing data in short time gaps, it is also used in numerous publications with similar work (Yancho et al. 2020; Arjasakusuma and Pratama 2021). This enables the comparison of the change rate in mangrove spatial distribution at different locations for the same period. Figure 7 summarizes the temporal change results of all mangrove areas.

Fig. 7
figure 7

Summary of the temporal change of mangrove area from 2007 to 2022 for each mangrove location separately. The chart shows the mangrove area in m2 on the left axis while showing the average percentage change per year on the right axis

To validate our vegetation area results, we conducted a literature review to identify other peer-reviewed publications that employed comparable methods and datasets to map vegetation cover in our study region during a similar period. Two relevant studies were found that met these criteria. The first, Saleh (2007), aimed to map mangrove vegetation on Abu Minqar Island (location 1) and establish a baseline database for future monitoring of mangrove habitat changes. That study reported mangrove vegetation coverage of 28.54 hectares in 2007. Our results for the same year and location yielded a mangrove area of 33.02 hectares, indicating consistency with an accuracy of 84.3% relative to Saleh (2007). The second study, Blanco-Sacristán et al. (2022), reported total mangrove distribution and afforestation potential in the Red Sea using satellite imagery and machine learning techniques. Their Google Earth Engine-based classification achieved an accuracy of approximately 98.2% ± 0.3% when validated against ground reference data. For 2022, that study estimated the total mangrove area along the Egyptian Red Sea coast to be approximately 24.46 km2. Our results for the same region and time yielded a mangrove area of 22.25 km2, corresponding to an accuracy of 91.32% relative to Blanco-Sacristán et al. (2022). Therefore, the average accuracy of our vegetation area estimations relative to these two independent studies is 87.81%.

According to the geomorphological conditions shown in Fig. 6, all mangrove locations were classified into three distinct categories. This grouping aimed to facilitate the identification of shared factors influencing the growth or degradation of mangroves along the Egyptian Red Sea shoreline. Group 1 represents mangroves located on offshore islands. It includes locations 1 and 2 covering the northern part of the study area. Group 2 represents mangrove locations that are suited along the shoreline and at the same time is represented by a mono-species mangrove, Avicenna Marina. This group covers the middle section of the study area from location 3–11. The third group covers locations 12, 13 & 14 representing the mangroves located onshore and on inter-tidal flats within the southern part of the study area, however, it contains the stands where R. Mucronata coexists along with A. Marina (Abubkr and Abdelazim 2017; Afefe 2021). The results of the combined mangrove monitoring are illustrated in Fig. 8. We calculated the mangrove areas each year where Google Earth images with a high spatial resolution of approximately 0.5 m were available (Fig. 2). We then computed the percentage change in the area between each pair of years and averaged them over the total study period of 15 years to obtain the average annual change in mangrove area.

Fig. 8
figure 8

Summary of the temporal change of mangrove area from 2007 to 2022 for three mangrove groups. Group 1 covers mangroves on islands, and Group 2 covers mangroves on the shoreline and represents a mono-species of A. Marina, Group 3 represents shoreline mangroves that are a mix between A. Marina and R. Mucronata

The results show that the mangrove along the Red Sea shoreline in Egypt is increasing and becoming denser in the northern (Group 1) and middle section (Group 2) of the study area. However, the rate of increase for the second group is almost 3% per year, which is three times higher than the first group with a rate of increase of 1% per year. This can be attributed to the locations of both groups, as the field investigation and satellite images have shown that all locations within Group 2 are suited within beach ridges downstream of fluvial plains on the shoreline. This geomorphological location is described as a crucial element of mangrove ecosystems because it aids in the mixing of freshwater runoff with seawater during rainfall events. Moreover, it increases the groundwater table during low flow conditions, which maintains a positive water balance even during dry seasons (Cohen et al. 2021). Several studies have indicated the importance of freshwater runoff on the growth of mangroves, it not only decreases the salinity of the mangrove environment but also delivers nutrients through sediments, therefore, freshwater is vital for the mangrove ecosystem protection and conservation (Santini et al. 2015).

As for the first group, mangroves grow on offshore islands, which limits their access to lateral freshwater runoff. However, studies showed that islands provide a quiet environment that protects the mangroves from extreme wind patterns and high waves. Most islands contain estuarine that allows the mangroves to grow, moreover, the salinity is altered by high evaporation rates on the islands or direct downpours (Kumar et al. 2010; Spalding et al. 2014). Therefore, group 1 has a lower growth rate due to its limited access to fresh water, but at the same time, it is in an environment that is distant from urbanization disturbances that aid its growth. In addition, tourism around mangrove islands was reported to be a threat to mangrove growth, for example, Safaga island (location 2), which has a mangrove forest that covers about 30% of its total area, was reported to be suffering from accumulation of waste including plastic bottles and bags, that started to affect the mangrove vegetation (Saleh 2007). This can be also another factor that aids in decelerating the increase rate on mangrove islands in Egypt.

On the other hand, most of the group 3’s mangroves that are suited within the southern section of the study area were found to be degraded at a rate of − 2.36% per year, the mangroves are becoming fragmented and scattered, while some mangroves disappeared. It is noted that one of the mangrove sites was degrading due to a nearby urban development, which redirected rainwater runoff away from the mangrove location, as the case in location 12 (Fig. 9) as a result increased the salinity of the water. Several studies have reported a negative correlation between the increase in urban built-up areas and the variation in the mangrove forest (Ai et al. 2020). For example, Maclvor, et al. (1994) reported that urban development in Florida Bay has significantly reduced the intake of fresh water, which made the bay’s water more saline (Mclvor et al. 1994). However, not all urban settlement negatively impacts the mangrove ecosystem, the same study found that four sites of mangroves out of the total ten they studied mangrove forests have expanded in these locations, despite the proximate urban growth, which is attributed to the awareness of the local people with the importance of the mangrove stands, which they left unharmed during the urban expansion process (Khan and Kumar 2009).

Fig. 9
figure 9

A Layout of Marsa Hemira Mangroves, urban settlements diverted watershed streamlines away from the mangrove area. Green rectangles show urban areas near the mangroves. B shows the reduction of mangrove extent between the years 2003–2022

Rainfall & runoff analysis

For the three mangrove groups, the trend of the average annual rainfall was extracted for each location to be compared with the rate of change in mangroves. The characteristics of the annual rain at each location are summarized in Table 2. The results show no significant relation between the increase in rainfall and the increase in the mangrove trees. Although all three locations have an increasing rainfall trend, Group 2, which has the highest rate of increase in mangroves has the least annual rainfall increase slope. On the contrary, group 3 is another location that had a substantial decrease in most of its mangrove settlements, although it has the highest rate of increase in terms of rainfall.

Table 2 Rainfall characteristics of the three mangrove groups in the study area

The second factor to be considered is the influence of the catchment area on the downstream mangrove ecosystems. It has been observed that a common characteristic among the examined locations is the expansion of mangrove areas. The Stream Power Index (SPI) was computed for various mangrove sites along the coastline and was subsequently compared with the observed changes in mangrove coverage, as illustrated in Fig. 10. The analysis revealed a significant positive correlation between these variables (R2 = 0.7356, R = 0.857, P-value = 0.003 < 0.05, CV = 70.26%), suggesting that the catchment area runoff has a notable impact on mangrove distribution. The statistical analysis indicates a strong and significant positive relationship between the SPI and the increase of mangrove area, with SPI explaining approximately 73.5% of the variability in mangrove growth. However, the high coefficient of variation (70.26%) suggests that while SPI is a significant predictor, other factors also play a crucial role in influencing mangrove area changes. Despite this variability, as denoted by a CV of 70.26%, the marked statistical significance (P-value = 0.003) reinforces the role of SPI as a critical element in mangrove development. This conclusion is consistent with the research conducted by Saenger (2002) and Prasad and Ramanathan (2008), who found that the growth productivity of mangrove trees is highly related to the sediments and nutrient dynamics (Saenger 2002; Prasad and Ramanathan 2008).

Fig. 10
figure 10

Correlation between the SPI and Percent of change in mangrove area

For example, Fig. 11 shows Location 14, where neighboring mangroves have different development levels, the mangroves highlighted in yellow are increasing, while the adjacent mangroves highlighted in red are decreasing. As illustrated, the increasing mangroves are suited directly over the shoreline and are located on an estuarine that transports rainwater runoff directly to the mangrove trees, while the decreasing mangroves are located on tidal planes and small islands away from the shoreline, therefore, these locations do not have direct surface freshwater and sediments input from the surface. As previously mentioned, freshwater runoff is vital for the mangrove ecosystem as it transports sediment that may increase nutrient levels as well as decrease the water salinity, which benefits the mangrove ecosystem. On the other hand, the decreasing mangroves do not have the same decreasing rate. For example, Fig. 12 shows location (a) from Fig. 11 has a slight decrease in mangrove area as it is surrounded by two streamlines of fresh rainwater, although they are not directly affecting the mangrove site they may affect the water salinity. On the contrary location (b), shown in Fig. 13 has decreased substantially with some parts disappearing. This might be linked to the freshwater intake as location (b) is away from the shoreline. In addition, mangrove species type might also be a factor in the decrease of mangrove settlements in this area. As mentioned previously Egypt has two types A. Marina and R. Mucronate, where A. Marina is the most dominant type while R. Mucronate is reported to be in the Halayeb area (location 14). Studies reported that A. Marina is more tolerant of high salinity as well low water availability and high temperatures than R. Mucronate. This aligns with the findings of the study where the locations in which mangroves are found to be decreasing noticeably are the same locations that are reported to have R. Mucronate mangroves along with A. Marina (Afefe et al. 2019; Abdullah 2020; Afefe 2021). Consequently, our analysis reveals complex interactions between hydrological factors and mangrove distribution. While initial hypotheses suggested direct rainfall impact on mangrove growth, our findings diverge, indicating minimal direct correlation. Instead, the study highlights the Stream Power Index (SPI) as a more significant predictor, suggesting that runoff, rather than direct rainfall, plays a pivotal role in mangrove expansion by enhancing sediment and nutrient delivery. This distinction underscores the nuanced relationship between different hydrological inputs and mangrove ecology, prompting a reevaluation of traditional assumptions regarding mangrove growth drivers.

Fig. 11
figure 11

The streamlines discharging to Safaga shoreline and at the same time some mangrove locations are increasing while others are decreasing

Fig. 12
figure 12

Mangroves change between 2005 and 2022 in location a at Halayeb shoreline

Fig. 13
figure 13

Mangroves change between 2004 and 2022 in location b at Halayeb shoreline

Limitations and classification errors

We acknowledge limitations in our study, including the variable spatial resolutions of Google Earth imagery and potential classification errors. These factors may introduce discrepancies in mangrove delineation and coverage estimation. We have addressed these challenges through methodological rigor and validation processes, yet they highlight the inherent complexities of remote sensing analysis. Future research should continue to refine classification techniques and explore additional environmental parameters influencing mangrove distribution. To assess the classification errors, we calculated the overall accuracy of the mangrove class using a confusion matrix. The confusion matrix compares the classified map with a reference map derived from high-resolution satellite imagery. The overall accuracy is the proportion of pixels that are correctly classified. The results of the error assessment are shown in Table 3.

Table 3 Accuracy assessment using confusion matrix of mangrove delineation

The overall accuracy of the classification was 91%, representing a high agreement between the classified map and the reference map and indicating that 9% of the reference mangrove pixels were omitted or misclassified as other land cover types. The main sources of omission and commission errors were the confusion between mangroves and other vegetation types, such as salt marshes, agricultural crops, sometimes shallow water surfaces, and the presence of mixed pixels and shadows in the satellite imagery. These errors could be reduced by using higher spatial resolution imagery, incorporating ancillary data, and applying more sophisticated classification methods.

As for the SPI analysis, it is limited by a notably small sample size due to the restricted distribution of mangroves in Egypt, compounded by the absence of ground-truth data for validation. Furthermore, given that the Coefficient of Variation (CV) was approximately 70%, indicating considerable variability, it suggests that factors beyond SPI significantly influence mangrove dynamics. Thus, future studies should explore additional parameters such as tidal range, sediment supply, and water quality. These elements, alongside SPI, could offer a more comprehensive understanding of the factors affecting mangrove distribution and health, enabling more targeted conservation strategies.

Conclusion

This research provides a comprehensive spatiotemporal analysis of mangrove distribution along the Egyptian Red Sea coast, leveraging satellite imagery and GIS methodologies to understand the impact of hydrological factors on mangrove dynamics. Our findings indicate a net increase of 4.5 hectares in mangrove areas from 2003 to 2022, highlighting an average annual growth rate of 2%. However, the study also identified a decrease in mangrove cover in 24% of the study area, particularly around Halayeb, reflecting environmental and anthropogenic stresses.

Contrary to initial assumptions, increased rainfall did not correlate directly with mangrove expansion, indicating that other hydrological factors, particularly runoff from catchment areas, play a more significant role in influencing mangrove growth. This is evidenced by the strong correlation between the Stream Power Index (SPI) and mangrove expansion, emphasizing the importance of runoff in providing necessary sediments and nutrients for mangrove ecosystems.

This study fills a critical gap in regional environmental research, offering valuable insights into the complex interplay between hydrological factors and mangrove distribution. The results underscore the importance of integrated coastal zone management and the need for policies that ensure the sustainability of these crucial ecosystems. Future research should aim to explore additional environmental factors and their impacts on mangrove health and distribution to aid in the development of more comprehensive conservation strategies.