Deep Learning Methods of Satellite Image Processing for Monitoring of Flood Dynamics in the Ganges Delta, Bangladesh

: Mapping spatial data is essential for the monitoring of flooded areas, prognosis of hazards and prevention of flood risks. The Ganges River Delta, Bangladesh, is the world’s largest river delta and is prone to floods that impact social–natural systems through losses of lives and damage to infrastructure and landscapes. Millions of people living in this region are vulnerable to repetitive floods due to exposure, high susceptibility and low resilience. Cumulative effects of the monsoon climate, repetitive rainfall, tropical cyclones and the hydrogeologic setting of the Ganges River Delta increase probability of floods. While engineering methods of flood mitigation include practical solutions (technical construction of dams, bridges and hydraulic drains), regulation of traffic and land planning support systems, geoinformation methods rely on the modelling of remote sensing (RS) data to evaluate the dynamics of flood hazards. Geoinformation is indispensable for mapping catchments of flooded areas and visualization of affected regions in real-time flood monitoring, in addition to implementing and developing emergency plans and vulnerability assessment through warning systems supported by RS data. In this regard, this study used RS data to monitor the southern segment of the Ganges River Delta. Multispectral Landsat 8-9 OLI/TIRS satellite images were evaluated in flood (March) and post-flood (November) periods for analysis of flood extent and landscape changes. Deep Learning (DL) algorithms of GRASS GIS and modules of qualitative and quantitative analysis were used as advanced methods of satellite image processing. The results constitute a series of maps based on the classified images for the monitoring of floods in the Ganges River Delta.


Introduction 1.Background
The increasing interest in flood hazards among the hydrologic scientific community has dramatically increased the demand for effective methods of geospatial data processing aimed at detecting floods.In hydrological studies and the management of coastal regions, detecting areas prone to floods is an essential issue.The monitoring of Earth observation data for cartographic visualization of flooded landscapes supports flood hazard assessment.This includes the processing of Remote Sensing (RS) data for analysis of flood extent, the consequences of disastrous events and the degree of flood impact, as well as evaluation of the affected area and estimation of changes in post-flood periods [1][2][3].Such analysis helps to highlight the spatial extent of floods and evaluate spatio-temporal dynamics.The processing RS data using a Geographic Information System (GIS) has been acknowledged as one of the most powerful approaches in hydrological hazard monitoring.Indeed, the analysis of satellite images helps to reveal information on the consequences of floods that lead to environmental changes such as destroyed areas, inundated areas, affected land patches, declined vegetation coverage and disrupted ecosystems [4,5].
Specifically for coastal Asian countries affected by global climate and environmental changes, as well as regional effects from monsoon seasonality, fieldwork to capture data on flooded areas is difficult.Moreover, direct observations in the areas affected by floods may be impossible both financially and practically.Depending on the safety of the inundated area and the severity of hydrological hazards, on-site surveys might be impossible.Therefore, the use of RS data for the mapping of flooded landscapes and evaluation of the spatial dynamics of water extent represent essential tools for the monitoring of floods [6,7].

Related Works
Evaluating the degree and rates of floods is useful for environmental risk assessment.For hazard prediction and mitigation of hydrological risks, the processing of RS data is an effective approach that can be used to reveal the affected areas.More specifically, satellite images represent valuable sources of information that can be processed for detection of areas in pre-and post-flood periods.For example, they can be used to reveal climateenvironmental patterns of floods and to evaluate spatio-temporal dynamics in pre-and post-flood periods.To mention a few examples of such applications, satellite images have long been used for numerical evaluation of risks [8], hydrological and irrigation modelling [9], susceptibility mapping of coastal areas [10], detection of affected areas and estimation of social-economic costs of floods [11,12], hydrogeological modelling [13], land use mapping and evaluation of climate and environmental impacts on vegetation [14] and computation of inundated areas [15].
RS data can be processed to retrieve information on floods from satellite images using diverse software and hydrological applications in geoinformatics.Traditionally, RS data have been processed by GIS methods.Diverse tools included in GIS allow for the mapping of the degree and complexity of flood hazards and environmental consequences through the classification of satellite images.For instance, for coastal regions in deltaic areas prone to floods, the time series of RS data are useful for visualising the dynamics of the ecological patterns related to flood events and monsoon cycles [10,16,17].Moreover, the analysis of satellite images covering countries located close to shorelines can help to better understand the effects of climate changes on coastal landscapes.
However, state-of-the-art software severely impedes the timely evaluation and analysis of RS datasets due to the manual, user-adjusted nature of processing techniques.In view of this, novel methods of machine learning (ML) represent better alternative to image processing and RS data analysis.ML emerged recently as a fundamental technique of image processing and classification.Its current applications include a wide variety of topics, such as environmental studies [18], earth science [19][20][21], geological and hazard risk assessment [22], hydrological monitoring [23] and vegetation analysis [24][25][26], to mention a few of them.Technical advantages of ML have been noted previously [27,28] and include high sensitivity in data analysis, flexibility of image processing and accuracy in detecting variations in land cover types to evaluate environmental dynamics.Moreover, diverse parameters of ML techniques can be finely adjusted using different algorithms, such as Random Forest (RF), Support Vector Machine (SVM) and many more.

Gap and Motivation
In order to perform environmental monitoring of flooded areas, policy makers and scientists need effective techniques and approaches.Therefore, flood mitigation measures include diverse methods and tools.Engineering solutions include, for instance, the construction of infrastructure, dams and bridges, maintaining the hydraulic performance of drains.Regulating traffic based on geoinformation regarding the locations of buildings and land planning support systems supports affected communities.Non-engineering methods mostly include modelling, prediction and prognosis for the implementation and development of emergency plans.Such methods enable the assessment of the vulnerability of areas to flood hazards through warning systems supported by up-to-date geoinformation.In this regard, using RS data processed by GIS is indispensable in evaluating the catchment of inundated areas and visualization of affected regions in real-time flood monitoring.
Currently, the cartographic monitoring of floods in the Ganges River Delta is mostly based on GIS-based mapping [29][30][31].Besides the conventional approaches, recent studies in the study area have used alternative data such as Sentinel-1 SAR images and data from the Google Earth Engine [32,33].Such case studies have raised questions about operative and accurate methods for data processing aimed at flood prediction and management.Accurate classification of satellite images for environmental mapping requires advanced methods and scripting languages that aim at robust detection of patterns [34][35][36][37][38]. Existing state-of-the-art methods of image processing and classification mostly use traditional GIS for data handling, which may lead to misclassification and inaccurate labelling of pixels.Nevertheless, the software that processes RS data for the monitoring of floods must include intelligent algorithms and techniques to deal with complex spatial patterns of flooded coastal areas, i.e., advanced computational methods that exploit the spatial variability and heterogeneity of the affected landscapes rather than visualising particular extents of the images.In this regard, ML and programming techniques represent advanced solutions to support real-time flood prognosis systems through the use of artificial intelligence (AI) algorithms [39].Such methods can be used for operative monitoring of floods and identification of landscape patterns within coastal and tidal areas, such as estuaries and deltas, which is challenging task due to the obscurity and ambiguity of land cover types.
Complimentary to the available traditional tools of satellite image classification, novel methods of Deep Learning (DL) can now be used as an advanced approach for RS data processing.For instance, algorithms such as Multilayer Perceptron (MLPClassifier) are designed to support image partition, classification and analysis through the use of decision trees and computer vision algorithms [40][41][42].The application of such methods in hydrological studies and coastal risk assessment creates principally new perspectives in cartography by combining RS data with programming approaches for the mapping of flooded areas.It is therefore particularly important to apply such advanced technical tools to regions with high heterogeneity and complexity of landscape patterns, such as coastal zones, where DL algorithms can generate image classification decisions and detect affected areas automatically.
When applied to a series of satellite images, ML methods can effectively discover the properties of landscapes through comparative analysis [43,44].Moreover, ML enables quantification of patches of landscapes on raster images using computer vision algorithms [45][46][47][48][49] or determination of landscape dynamics for environmental monitoring [50,51].Finally, another advantage of the ML approach is that it is a resource-and time-effective method based on advanced programming methods that largely involves scripting techniques.Such an approach enables the automation of data processing and cartographic analysis, as mentioned earlier [52][53][54].Hence, using ML enables the indication of flood risk and the development of crisis strategies in flood-prone areas such as the Ganges River Delta, Bangladesh.Moreover, such methods are especially effective for detecting correlations between environmental processes in coastal areas and the effects of climate change over time, which are especially relevant for tropical regions that are subject to monsoon activity.Nevertheless, among the most serious deficiencies scientists face with current GIS is the lack of appropriate ML-based methods of RS data processing.In this regard, the Geographic Resources Analysis Support System (GRASS) GIS represents advantageous software that includes methods of ML for the manipulation of satellite images using advanced algorithms such as deep learning (DL) and Artificial Neural Networks (ANNs).

Goals and Objectives
This paper presents the use of advanced DL tools of GRASS GIS for satellite image classification.Moreover, it addresses a particular problem of monitoring flooded areas around the Ganges River Delta, Bangladesh.Several Landsat satellite images are used, processed, classified, compared and analysed to evaluate pre-and post-flood periods in coastal Bangladesh.The potential of the ML modules of GRASS GIS for the mapping of consequences of hydrological hazards is exemplified by the case of the affected landscapes of coastal Bangladesh and associated climate dynamics related to the monsoonal climate of the Indian Ocean.The focus of this manuscript is a holistic approach to accurate satellite image processing with the help of open-source software GRASS GIS.The methodology applied to the subject of the study can be applied to the other relevant countries located in coastal regions with flood-prone areas.

Current Landscape
This study presents a case of the Ganges River Delta, an area regularly affected by floods and located in southern Bangladesh (Figure 1).The Ganges River Delta is the largest river delta in the world.It has a population of hundreds of millions of people in its total catchment area.Located in a region with a monsoon climate and a seasonally changing environmental setting, it is subject to regularly repeating floods, occasional tropical cyclones, tidal waves and related inundations [58].The complex hydrology of the Ganges River Delta increases the consequences of floods through a dense network of streams, rivers and tributaries where water remains for a long period [59].Alluvial clayey sediments dominating in the riverbed contribute to the stagnation of water during floods, since they accumulate in numerous interconnected channels, inner lakes, wetlands and flood plains of the Ganges River Delta [60][61][62].The monsoon climate regulates the repeatability of rainfall and floods in the Ganges River Delta, which normally increase in the period between March and September.

Problem Formulation
Repetitive floods in the Ganges River Delta negatively impact social-natural systems.They cause losses of lives and damage to infrastructure [63], as well as fragmentation and disruption in natural landscapes [64] and increased salinity due to the intrusion of oceanic water during storms.Moreover, floods affect crop agriculture [65,66] and negatively influence the sustainability of coastal ecosystems [67][68][69].Millions of people living in southern Bangladesh and neighbouring regions of India are vulnerable to such hazards due to exposure, high susceptibility and low resilience to repetitive floods [70,71].
Examples of social effects of floods include restricted or limited access to clean drinking water, damage to the electricity network and broken transport and communication systems.Furthermore, flood hazards disrupt regular education and normal working environments, as well as healthcare support for the population [72,73].The long-term effects of floods and their consequences, which may last for months, seriously affect the social-economic system of Bangladesh.The coastal area of the Ganges River Delta supports a population of approximately 56.7 M , which encompasses the study area [74], where many settlements are located.This includes both small villages and large cities such as the capital, Dhaka; Khulna (the third-largest city in the country); Comilla; and Narayani.Supporting such flood-prone areas requires geospatial monitoring of flood risks in order to visualise the affected areas on flood maps [75,76].
The uncertainty of flood prediction in the Ganges River Delta has an impact on vulnerability to risk and information dissemination among the local population.Hence, preventive prediction raises a question of using reliable data and advanced methods for operative monitoring of floods and assessment of environmental sustainability using flood maps [77].Various techniques have been developed to produce flood maps.Among them, satellite-based flood maps tend to provide real-time, contiguous representations with varying spatial resolution over time and higher accuracy.The main approach that a country can take to assess flood risk is to map areas that are susceptible to flooding based on their geographic setting and comprehensive flood risk assessment.Such analysis can be performed when satellite images are integrated with geospatial information, e.g., frequency of floods, topographic relief, population density, locations of cities and climate setting.In this regard, flood maps should be prepared by the relevant authorities, and remote flood monitoring should be used to reduce risk during weather events.
Notably, no prior study has explored the deep learning (DL) methods available in GRASS GIS [78] for the mapping of floods in the Ganges River Delta, Bangladesh.As a response to this gap, this study presents a comprehensive evaluation of multispectral imagery as a report of the use of such an approach.Specifically, the methodology of this research is based on the use of DL methods of satellite image processing in GRASS GIS scripting software.Deep learning is highly scalable for image processing purposes, since it can analyse large datasets, such as times series of RS data, and conduct numerous computations in a cost-and time-effective way using scripting software such as GRASS GIS.Hence, the application of DL for environmental monitoring increases the productivity of RS data processing by speeding up image processing using different algorithms (Figure 2).Moreover, DL also increases the flexibility of image processing by allowing trained models to be applied to various environmental and hydrological problems.The implementation of such an approach is realised through the MLPClassifier algorithm from the embedded Scikit-Learn library of Python [80,81].

Materials and Methods
The data and software used in this study have been obtained from the following sources.Software include the following programs: GRASS GIS version 8.3.2 from GRASS Development Team (National Research Council, USA), GMT version 6.4.0 (School of Ocean and Earth Science and Technology of the University of Hawai'i at Mānoa, Honolulu, HI, USA), Inkscape version 1.2 (Sodipodi developers, University of California, Berkeley, CA, USA), R software environment for statistical computing and graphics (R Foundation for Statistical Computing, Vienna, Austria).Data include the following sources: General Bathymetric Chart of the Oceans by GEBCO Guiding Committee (British Oceanographic Data Centre (BODC), Liverpool, UK), Landsat 8-9 OLI/TIRS satellite images from the United States Geological Survey (John Wesley Powell Center for Analysis and Synthesis, USGS, Reston, VA, USA)

Deep Learning
As a branch of machine learning (ML), deep learning (DL) is increasingly used in the earth sciences as a tool for automatic processing of geospatial data.DL can be applied by a variety of tools, using programming libraries, embedded plugins and modules in geographic information systems (GIS).However, the problem remains with the technical approach of such methods, specifically for RS data and satellite image processing.Among the geoinformation software that operates with RS data, GRASS GIS [78,82,83] proposes effective solutions to satellite image processing with the valuable option of utilising diverse choices of models for image classification.
Among the existing ML methods, the most widely used approach is DL, with many examples of applications for satellite image processing in environmental studies [84][85][86].For example, DL presents an advanced technique for evaluating environmental dynamics during climate change assessed through the satellite image analysis [87].There are many DL algorithms that have various parameters and functionalities for image classification.Overall, such algorithms train the computer model using knowledge derived from the input layers and processed in hidden layers, which results in accurate modelling of data.Moreover, DL considers existing conditions in geospatial data that are commonly expressed in terms of spatial relations and the topology of objects.
Existing algorithms of the ML modules of GRASS GIS use neural networks (NNs) [88][89][90] to learn semantic representations of features as indicated by pixels in images derived from Earth observation (EO) data.This enables evaluation of landscapes dynamics and assessment of environmental properties [91], as well as the application of advanced methods of segmentation [92], feature extraction and classification [93] for data analysis.Further development of DL methods aims at achieving high-precision image processing using information obtained from spectral reflectances of the land cover types detected in images, as well as the use of complex programming algorithms, e.g., NNs [94].

Workflow
The methodological workflow consists of several steps aimed at geospatial analysis and image processing (Figure 3).This study mainly uses the DL methods available in the GRASS GIS modules for satellite image processing to detect flooded areas in the Ganges River Delta, Bangladesh.The methodology also includes the processing of diverse data obtained from different sources.While the purpose of the EO data was to provide information on objects and features of the land surface visible from space, the choice of methods varied according to the purpose, including specific DL algorithms and techniques of image processing [96,97].

Theoretical Fundamentals of MLP
The multilayer perceptron (MLP) is a class of DL and a conceptual theoretical background for the data analysis performed in this study.MLP represents a feedforward artificial neural network (ANN), a branch of the DL methods [98].It consists of fully connected neuronswith a nonlinear activation function organised in at least three layers (Figure 4).These layers are used to distinguish the data that are not linearly separable and, for time series of satellite images, variables that are changing over time.This results in different values of pixels recognised by the model as Digital Numbers (DNs).Such characteristics are caused by spatio-temporal variability of the spectral reflectance of pixels that constitute the image.Since physical properties of landscape and vegetation patches vary significantly, such a mosaic of landscape patches is reflected on the raster matrix and can be identified on the satellite images accordingly [99][100][101].

Data
In this study, we used eight Landsat 8-9 Operational Land Imager (OLI) and Thermal Infrared Sensor (TIRS) multispectral satellite images for environmental mapping of the Ganges Delta, Bangladesh.The images were selected for flood and post-flood periods (March and November, respectively) covering the periods of 2021, 2022 and 2023.The images taken in March and November of 2014 were used as a seed for training pixels in deep learning classification.The generated dataset is collected from https://earthexplorer.usgs.gov/[102] (accessed on 2 March 2024), with image samples openly available for download, processing and data reuse.The original Landsat images included multispectral, panchromatic and SWIR bands (Figure 5).
The images were in GeoTIFF format and contained the seven multispectral bands for each image.Hence, the image recordings received from the USGS source include RS datasets.The metadata were explored, and the records are available in Table A1 in Appendix A. The most essential technical characteristics of the images are summarised in Table 1.Besides quality, coverage and availability, another advantage of the Landsat archives consists of their economic values; these data are reusable for further distribution and future research.Thus, in similar studies, these scenes can be utilised as input data for similar tasks in image analysis, such as classification, detection of land cover types and image segmentation.The presented GRASS GIS workflow model of other technical methods described in this study can be utilised for image processing.
The datasets are available in EarthExplorer [102] and originate from the NOAA Landsat collections [103].The images were pre-projected as original data and had the following technical characteristics: Datum and Ellipsoid World Geodetic System 84 (WGS84), stored in Universal Transverse Mercator (UTM) Zone 46 for southern Bangladesh, and Worldwide Reference System (WRS) Path/Row 137/44.The data were collected at Nadir in daytime.The Landsat Collection category is T1, Number 2 for all the scenes.The Landsat Station Identifier is LGN with sensor identifier Landsat OLI TIRS for all the images.Data Type L2 is OLI TIRS L2SP.The remaining essential characteristics of the images are summarised in Table 1.The selection of these data is explained by the reputation and reliability of the Landsat satellite imagery widely used for environmental studies.Landsat images are openly available free of charge and have a high frequency of orbit (8-day repeat coverage of Landsat scene area) and high quality.Hence, these images represent a reliable source of information for the detection of the extent of floods and visualisation of inundated areas using time series analysis.Their applications are reported in many existing studies with a focus on environmental monitoring [104][105][106][107][108]. The data were collected from the freely available repository of the United States Geological Survey (USGS)-EarthExplorer [102].The original data are visualised in Figure 5.

Software
The workflow used in this research employs a chain of modules that utilise GRASS GIS scripting software version 8.3.2 [78] for image processing.The technical details of such an approach are described in earlier works [109,110].For the installation and use of the machine learning (ML) modules of GRASS GIS, we recommend using Python version 3.8.5 or higher.Specifically, the installation of our framework can be performed using the available packages in the shared data.Additionally, the XCode needs to be installed for writing the scripts.These libraries can be installed using 'pip install', with more details in the online resources of GRASS GIS.Finally, using GitHub version 3.12.1 is recommended for backup of scripts and revision.The methodology of the time series analysis includes the unsupervised and supervised classification of the multispectral satellite images with the aim of detecting changes in landscapes around the Ganges River Delta in the pre-and post-flood periods.The map in Figure 1 was prepared using Generic Mapping Tools (GMT) version 6.4.0 [57,111] with a raster grid of the General Bathymetric Chart of the Oceans (GEBCO).

Implementation
We used a workflow in that GRASS GIS platform as a container of diverse modules to run the scripts on MacOS using the approach presented in Figure 5. GRASS GIS uses algorithms of ML/DL methods of image processing derived from Python's Scikit-Learn library [80] via the integrated libraries in the machine.For the GRASS GIS platform, this is performed using the containers of modules via the sequence of commands presented in Listings 1-3.The processes include the import and pre-processing of the multispectral bands of the given image, image analysis and classification.The classification is based on fundamental properties of the RS data on differences in the spectral reflectance of pixels that are associated with land patches on the land surfaces visible from space.Here, each patch of the Ganges River Delta contributes to the mosaic of landscapes evaluated for the March (flood) and November (post-flood) periods of 2021, 2022 and 2023.
The following is an outline of the essential details regarding the approaches and techniques of the algorithms that compose the GRASS GIS framework used for image analysis.Full codes are presented below and explained with the essential details.In all the GRASS GIS modules and functions, as well as for post-processing of the satellite images using the DL approach, it is necessary to apply the module that implements the required functionality for data processing of each image.In this sense, the parameters of scripts are adjusted in terms of the identifiers of functions and specifications of image processing.For this purpose, we adopted and modified the approaches of the ML modules of GRASS GIS, which rely on Python's Scikit-Learn library for DL techniques.

Image Processing
The images were first imported into the GRASS GIS system using the 'r.import' module, then pre-processed.Afterwards, the colour composites were created using 'r.composite'.The images were then displayed using a combination of the 'd.mon' and 'd.rast' modules.The files were saved in bitmap format using the 'd.out.file'module.The binary results of the DL mapping and programming scripts used for DL image analysis are available in the GitHub repository using the following web link (accessed on 3 March 2024): https://github.com/paulinelemenkova/Floods_Ganges_GRASS_GIS_DL_Image_Analysis.
The results of the generated colour composites are presented in Figure 6.This step is implemented using the GRASS GIS syntax (an example is presented for November 2023) presented in the codes of Listing 1.
The unsupervised classification is based on a clustering technique using k-means and maximum likelihood embedded in GRASS GIS.Practically, it was performed using the 'i.group', 'i.cluster' and 'i.maxlik' modules.The latter creates the signature file and performs accuracy assessment using the 'reject' function.This function evaluates the rejection probability of the pixels using a chi-square test, which is used to examine the dependence of categorical variables, i.e., pixels, on the raster scene.This step is implemented using the GRASS GIS syntax (an example is presented below for November 2023) in the codes of Listing 2. The results of this step are used as training data for supervised classification using a deep learning approach.The resulting maps are demonstrated in Figure 7.Moreover, selected example of accuracy analysis for 2014 that was used as a training dataset is shown in Figure 8.This step includes the procedures of clustering that generate a signature file and a report using the k-means algorithm through the 'i.cluster' module of GRASS GIS.Unsupervised classification was performed using the 'i.maxlik' module.The results of this step provided the seed data and training map for the next step of DL modelling.The maps are presented in Figure 2.
The results of the accuracy assessment are presented in Figure 8, which shows the reject threshold map layer created using the 'i.maxlik' module of GRASS GIS.The maps are computed for each satellite image and contain the index to one calculated confidence level for each classified pixel in the classified images.The values range from 0 to 100 %, which indicate the predefined confidence intervals.For interpretation of the reject maps, lower values 0.1 = keep, and those close to 100% indicate reject.The application for this map layer is as a mask indicating raster pixels in the classified images that have a low probability of flood categorisation (that is, a high rejection index) and being assigned to the correct class.
The computed maps are based on the evaluated reject raster map, which indicates the results of the evaluated reject thresholds.The reject thresholds were calculated using a chi-square test, which is a statistical approach that tests the goodness of fit of the datasets.This test was used to determine whether the computed pixels and assignments to various land cover classes are acceptable or should be rejected.The approach of the chi-square test is based on the hypothesis that the resulting data have a specified distribution of land cover classes at the specified level of significance.Hence, an accuracy assessment was conducted on each satellite image, showing the discriminant results at various threshold confidence levels for the assigned pixels.The maps shown in Figure 8   The deep learning (DL) analysis was performed using the Multilayer perceptron (MLPClassifier) algorithm for automated classification of the series of satellite images.First, the extent of the spatial region was defined using the 'g.region' module, which sets up the coordinates of the maps within the project using the target map.Afterwards, the training pixels from an older (2014) land cover classification were generated using the 'r.random' module of GRASS GIS and used as seeds.Next, the imagery group with all Landsat-8 OLI/TIRS bands was created to include all the multispectral bands (since we do not need panchromatic bands in this case, they were excluded from data analysis).Then, the training pixels were applied to perform a classification using the 'MLPClassifier' of DL approach applied to recent Landsat images (in the presented code below, the image for November 2023).This method trains an MLPClassifier model using 'r.learn.train'.
After this step, the prediction of the pixel assignments to each land cover class in the Ganges River Delta was performed using the 'r.learn.predict'module.The raster categories were automatically applied to the classification output and checked again using the 'r.category' module.Following that, the color scheme was assigned from the land class training map and visualised using the 'r.colors' and 'd.rast' modules.Technically, the DL approach was realised using the 'r.learn.train'module of GRASS GIS and demonstrated in the script of Listing 3.
Each image of the produced dataset contained seven multispectral bands processed automatically by the GRASS GIS 'r.learn.train'and 'r.learn.predict'modules for each image.The total processing time for one image is ca.30 min, which demonstrates a high time efficiency of the proposed GRASS GIS DL algorithm.The MLPClassifier algorithm was tested initially on a single image processed as a complete workflow for the March and November 2021, 2022 and 2023 datasets, then analysed for changes in the evaluated period.Changes detected using the repeatability pattern of land cover types in the Ganges River Delta were evaluated for the flood-and post-flood periods.Noise background related to cloudiness is ignored, since the images were collected under high visibility (below 10% cloudiness), which ensured that land cover types are clearly visible and identified by the ML algorithm.

Results
The Landsat satellite images evaluated in this study cover the regions of southern Bangladesh and the periods of March and November for the years 2021, 2022 and 2023.The analysed images included multispectral bands and were collected on cloud-free dates, which enabled the detection of notable changes in the flooded areas.Land cover changes during flood and post-flood periods were measured using the advanced 'MLPClassifeir' DL approach, as described in the previous section.The scripting approach was developed in GRASS GIS and employs the Python algorithms of the Scikit-Learn ML library.The variations in the flooding characteristics in the mapped region show an increase in the water level, which is associated the pre-monsoon and monsoon rainfall over the river catchments of the Ganges, Brahmaputra and Meghna rivers.Another factor in addition to the water flow is the intake from the snow melt in February, which is reflected in early March levels.
The hydrological peaks of the Brahmaputra River in late August or September show that the maximum flow of a stream in response to a rainstorm event coincides with the Ganges River peak in 2022.In contrast, sandy areas in the inlet of the Ganges River are more pronounced in 2023 due to the changed conditions and the local climate setting, which is visible in the scenes of the classified Landsat images.The increase in inundated areas in the wetlands of the Ganges River, the development of mangrove forests and the fragmentation of the forest land cover types were detected in the images of the processed scenes using the DL modules of GRASS GIS.The hydrological contribution from the Meghna tributary to the Ganges River stream follows a similar hydrological pattern to that of the Brahmaputra River.Since the Meghna River has high water levels that extend into September due of a backwater effect, the contribution of the Meghna to the Ganges River's flow is more pronounced in the images for November.Hence, as shown in the images, the categories of land cover types were visualised and evaluated using image classification methods.The flooding periods impacted the hydrology of the Ganges River as a result of the monsoon effects in southern Bangladesh.

K-Means Classification Outcomes
Flooded areas in the Ganges River Delta detected and mapped using MaxLike methods are presented as a series of the resulting maps in Figures 9 and 10, and deep learning (DL) results are presented in Figures 11 and 12.
The classified images show the pre-and post-flood inundation maps for the region of the Ganges River Delta during March and November in 2021, 2022 and 2023 based on the Landsat images.The findings reveal a changing pattern of expanded floods in the post-flood period in the Ganges River Delta and inequality in the distribution of inundated areas covered by water in consequent years (2021, 2022 and 2023).
The flood periods in 2022 in southern Bangladesh caused significant deluges and inundations, which affected cropland areas as well as settlements in rural and urban districts.Selected areas also experienced extended periods of inundations, while coastal areas were continuously inundated.Finally, land cover types related to orchards were affected by floods.Thus, the results show the distribution of continuing water bodies in March, which increases in November, covering an area of southern Bangladesh.In March 2021, the total flood-inundated area was lower, with most inundation occurring in cropland (Class 6); followed by urban settlement (Class 8); orchard areas (Class 9); and other areas, such as wetlands, mangroves and aquaculture (Classes 2, 3 and 10, respectively).The maps were generated using the classified images for March showing the flooding event (Figures 9 and 11), as well as the images for November (Figures 10 and 12) showing the post-flood landscapes.Comparing these two periods, all crop-related land cover types represent areas notably affected by floods, which also occurred in the regions of residential property.Correspondingly, larger areas were inundated, including affected public infrastructure during the catastrophic November months when heavy monsoon rains continued to pummel the affected districts in close proximity to the Ganges River.

Deep Learning Outcomes
The supervised learning models of GRASS GIS based on MLPClassifier demonstrated accurate results in flood mapping and refined visualisation functionality.The outcomes of DL show that for the March-to-November time frame, some patterns were common for both months, while autumn months were newly inundated (Figures 11 and 12).
In contrast, the spring period demonstrated that areas in selected northern regions recovered following continuous inundation, while southern areas located in the proximity of the Ganges River Delta were progressively inundated.While the DL method was developed to serve a specific goal of image processing, its is applicable as a solution for the monitoring of the outcomes of floods in the detected inundated areas, as presented above.Hence, the research outcomes provide valuable insights into the monitoring of changing landscapes comparing flooded and post-flood periods in the Ganges River Delta.
A time series analysis of the Ganges River Delta was used to plot and graphically display changes in the flood and post-flood periods for southern Bangladesh.The analysis of data for three test periods (2021, 2022 and 2023) illustrates that some areas recovered from flood waters as time progressed, in contrast with the inundated areas.The data for 2014 were used as a training polygon for DL modelling, which requires a classification seed.The derived maps were produced from the cloud-free Landsat images processed by the DL methods between the flooded period in March and the post-flooded period in November, when some areas had recovered from inundation.The results of numerical analysis are summarised in tables showing the extent of areas occupied by diverse land cover classes in the flood period (Table 2) and post-flood period (Table 3).The maps generated using GRASS GIS show high potential environmental monitoring.The methods of deep learning support accurate image classification through the use of advanced computer vision and pattern recognition algorithms.The time series flood data made using scripting models of GRASS GIS with opensource specifications catalyse further innovation in risk management and represent solutions for state-of-the-art mapping of floods using programming approaches and ML modules.The following 10 land cover types were identified around the Ganges River Delta, Bangladesh: (1) water, (2) wetlands and mudflats, (3) mangrove forests, (4) sandy areas, (5) forests, (6) croplands, (7) grasslands, (8) urban settlements, (9) orchards and (10) aquaculture.Information on land cover types was derived from Rahman et al. [112], Sousa and Small [113] and Paszkowski et al. [114] and applied to the extent of the current study area.The presented maps of floods can be used as a broad base for environmental applications and flood hazard assessment.Their application potential ranges from academia and research, industry and development to governmental and social services for risk prevention.
The maps derived using the deep learning approach were produced from the cloudfree Landsat scenes collected between the March and November periods and are shown in Figures 11 and 12.The presented land cover maps are intended for potential flood damage assessment in southern Bangladesh.Corrections of the presented framework and the Python-based algorithm of GRASS GIS derived using a machine learning (ML) approach with the deep learning (DL) MLPClassifier represent an advanced tool for automated recognition of land cover types in satellite images and the monitoring of floods in floodprone regions of southern Bangladesh.The percentage of correctly classified images was calculated summarised in the matrices showing class separability (Figures 13-15 for the years 2021, 2022 and 2023, respectively) and evaluated in the accuracy assessment.
The class separability matrices of land cover classes identified in the Ganges River Delta are presented in Figures 13-15.Figure 13 shows class separability matrices for March The covariance matrices signify the values of class separability, which are composed of the cluster means based on the values of the spectral signatures of pixels.They demonstrate the results of the cluster's means obtained from the computed covariance matrices.The matrices were generated using the 'i.maxlik' function of GRASS GIS during the image classification process.The columns signify 10 generated land cover classes, and the rows signify the number of pixels correctly assigned to those classes.Hence, the class separability matrices show the error matrix for the pixel-based maximum-likelihood classification, which indicates the correctness of the pixels assigned to the land cover classes from 1 to 10.The results of image clustering using values of spectral classes are related to the land cover types identified in the Ganges River Delta and the surroundings.
The matrices consist of ten classes and computed pixels for each land cover class.The land categories are defined as follows: water bodies, wetlands and mudflats indicating inundated areas, mangrove forests and associated swamps, sandy areas on riverbanks, forests (e.g., tree cover, hill forests), croplands and homestead croplands, grasslands, urban and rural settlements, orchards and aquaculture.Class separability matrices evaluate the assignment of pixels to various land cover classes in the landscapes of the Ganges River Delta.Hence, the matrices serve the function of regularisation parameters used to determine the distinguishability of pixels according to their spectral reflectances.In this way, class separability matrices perform iterative searches for cells within the raster matrix of the image considering a range of values of pixels assigned to different land cover types.
Through the applied automatic DL-based image processing and mapping workflow, flood inundation mapping of southern Bangladesh has the potential to provide information on inundated areas.Time series of Landsat images are essential for flood management in real-time regimes.Using the techniques of deep learning applied to flood mapping, a significant difference in values of spectral reflectance for land cover classes in inundated areas (containing high percentages of water and moisture) and non-water (dry) areas enables a distinct separation between these land cover categories.Automatically derived ranges for inundated areas in Landsat images show a clear discrimination of the affected areas from other classes, as presented in the figures supporting this research.
It is well known that Bangladesh is a country particularly vulnerable to hydrological hazards and flood disasters.Therefore, testing and implementation of novel cartographic methods for RS-based mapping of flooded areas are essential for operative monitoring of areas at risk, such as coastal areas of the Ganges River Delta.The cumulative effects of the flat topographic relief and monsoon climate result in the high level of vulnerability of Bangladesh to floods, with over 80% of the population exposed to flood risks.Diverse measures have been undertaken by the authorities and government of this coastal country to protect the population from devastating flood disasters.The construction of engineered infrastructure to protect against floods includes flood shelters, hydrologic sluice gates and river regulators, dredged drainage channels, etc.
Earth observation data represent indispensable resources for flood monitoring from space, as demonstrated in this study.The technical advantage of the demonstrated novel methods of flood mapping consists of an automated approach of deep learning applied to inundated areas in Bangladesh.More specifically, this paper contributes to the development of cartographic methods for visualisation of flooded areas using satellite images and deep learning (DL) techniques available in GRASS GIS.The presented and discussed programming codes can be reused for flood mapping in similar studies.

Discussion
Floods are a major threat to human communities all over the world, with serious socio-economic and environmental consequences, given that they are the leading cause of natural disaster losses.Related research shows that one in four people worldwide is considered to be at significant risk from flooding.Bangladesh, which occupies low-lying flood and tidal plains, has one of the world's largest and most disaster-prone deltas.In particular, the absolute number of people at risk of flooding in Bangladesh is 94.42 million, or 57.5% of the country's population (the second highest in the world).Consequently, floods in the Ganges River Delta represent one of the most catastrophic problems at the national level [115].In this regard, preventive mapping of flooded areas is of societal importance for the social system of Bangladesh and contributes to the maintenance of the sustainability of both natural landscapes and social infrastructure.
Social awareness of flood hazards can help in mitigating the risk associated with floods.Remote sensing (RS) data processed using advanced methods and visualised on maps are essential in addressing environmental challenges.Processing of RS data is useful in mapping areas at risks, as well as for cartographic display of inundated coastal areas and prognosis of floods in deltaic areas based on time series analysis.To this end, the advanced methods of deep learning (DL) used for operative mapping of flooded areas support publicly accessible, modifiable and distributable open-source cartographic products.Such products can be used for preventive monitoring of areas at risk, prognosis of flood events and hydrologic modelling.Hence, operative monitoring and forecasting of flood hazards using RS data can effectively reduce the catastrophic consequences of floods in the Ganges River Delta.
The use of advanced DL methods for accurate processing of satellite images is possible using open-source GRASS GIS, which represents an effective method of retrieving geoinformation.This study presents the use of such a DL-based image analysis using GRASS GIS for mapping of flooded areas in the coastal region of the Ganges River Delta.Through comparison of the multi-temporal RS data, the areas affected by floods were detected and compared for the flood and post-flood periods.The presented workflow demonstrated that the DL techniques of GRASS GIS have significant advantages for image classification because DL increases the accuracy and automation of mapping through the use of AI algorithms in the cartographic workflow.Automated detection of similar spectral characteristics was applied to different land categories, assigning them to distinct classes, which helps to overcome the challenges of misclassification.Second, heterogeneous landscapes with highly dense mosaics of landscape patterns, which are typical for coastal Bangladesh, were identified by ML with regard to the resolution of the Landsat images and defined classes.Spectral properties of the multispectral satellite images were evaluated for land cover changes in the inundated areas of the Ganges River Delta.
Flooded areas in the Ganges River Delta were determined over the target dates using time series analysis of Landsat satellite images and compared for flood and post-flood periods.The results indicated an increase in wetlands and inundated areas during the later period detected by the DL methods and cartographic scripts.The obtained results comprise a series of maps of the Ganges River Delta that show that flood periods reached a peak in November and affected coastal landscapes of the Ganges River, demonstrating an increase in flooded areas.The presented time series of maps showing floods in March and post-flooded landscapes in November highlight the benefits achieved by RS data visualisation for analysis and comparison of flood extent.
Floods have varied effects on the behaviour of landscapes differ over the years as indirect indicators of climate effects and monsoon processes.In fact, the combination of the regional hydrologic behaviour of the Ganges River, the structure of sediment and the proportions of clayey sediments in the soil resulted in a significant increase in the degree of water stagnation in inundated areas.The behaviour of coastal areas was evaluated within three years (2021, 2022 and 2023) to demonstrate the effects of floods on landscapes, as reflected in the maps prepared using clustering (Figures 9 and 10) and DL techniques (Figures 11 and 12).Similar to existing studies discussed in earlier sections, the flooded period of the Ganges River resulted in the highest level of inundation of the coastal regions of southern Bangladesh in the November period compared to March.

Conclusions
This study demonstrated the capacity of sequential analysis of RS data to identify changes in the coastal and wetland landscapes of the Ganges River Delta over the last three years for comparison of flood events with post-flood landscapes.The results illustrated the effectiveness of satellite images in the identification of flood extent and detecting affected areas.Moreover, the results show the technological advantages of DL for satellite image processing with a case of GRASS GIS.The demonstrated and discussed codes can be used in similar studies including vulnerabilityanalysis and flood risk assessment in the future.In relation to previous studies and working hypotheses, the results of this study can be integrated with related geoinformation, such as hydrologic models, satellite altimetry, aerial imagery, topographic maps and hydrodynamic flood models.These data can then be be used for flood forecasting, simulation of flood models in southern Bangladesh, to provide information on the spatial extent of flooded areas and to estimate possible impacts of floods.The integrated use of such information is useful in undertaking adaptive measures and mitigating floods in the Ganges River Delta.
Importantly, this paper presents a case of flood mapping in the Ganges River Delta integrating open-source data and methods.The dataset was obtained from the publicly available repository of the USGS and processed using freely available GRASS GIS software.Such an approach is essential for policy makers from developing countries such as Bangladesh, since free data and tools can motivate further studies to continue and expand spatial analysis using the proposed techniques.In future studies involving environmental monitoring, this research can be further extended for larger spatio-temporal extents of the Ganges River Delta.For example, a series of maps covering extended periods can be produced using complementary RS data.Moreover, upscaling of the data for a basin or sub-basin level can support more general estimation of flood impacts for hydrological risk assessment.Finally, spatial analysis based on ML-based image processing can be included as a cartographic support for community-based water resource management in southern Bangladesh to monitor areas prone to flood disasters.
In conclusion, this research has demonstrated an example of using the advanced approach of ML in cartography and RS data processing.Thus, it has led to a greater understanding of the importance of using advanced methods of machine learning for environmental monitoring.The application of ANNs as a branch of machine learning methods, presented here as a case of the MLP classifier algorithm, demonstrated that such a technique can be successfully applied in similar studies that require RS data for spatio-temporal analysis.The promise of the ML methods of GRASS GIS remote sensing software for image processing and environmental data analysis was demonstrated.We evaluated the proposed ML framework of GRASS GIS on Landsat scenes; however, other satellite images can also be applied in future similar studies.

Figure 1 .
Figure 1.Topographic map of Bangladesh and the study area showing the placement of the Landsat data over the Ganges River Delta.Digital elevation data: SRTM/GEBCO, 15 arc sec resolution grid[55,56].Software: GMT version 6.4.0[57].Map source: author.

Figure 2 .
Figure 2. Conceptual structure of ML and DL algorithms in geospatial data analysis and image processing by GRASS GIS.Graphical software: Inkscape version 1.2 [79].Scheme source: author.

Figure 3 .
Figure 3. Workflow scheme illustrating the methodology used in this study for image processing by GRASS GIS.Software: R version 4.3.3,library DiagrammeR version 1.0.11[95].Diagram source: author.

Figure 4 .
Figure 4. General methodological scheme for the DL method of satellite image classification and EO data processing.Software: R version 4.3.3,library DiagrammeR version 1.0.11[95].Diagram source: author.

Figure 5 .
Figure 5. Data sources: Landsat 8-9 OLI/TIRS images of the Ganges River Delta, Bangladesh, collected during the flood period (March) and post-flood period (November) in 2014, 2021, 2022 and 2023 and used for analysis of flood dynamics.Data source: USGS [103].Compilation source: author.
The additional Python libraries required by GRASS GIS are included in the modules through the embedded links and include the following: Matplotlib version 3.8.4,NumPy version 1.26.4,Pandas version 2.2.1, Scikit-Learn version 1.4.2 and SciPy version 1.13.0 .

Funding:
The APC was funded by MDPI and the IOAP Participant University of Salzburg.

Table 1 .
Attribute table of the main characteristics of the Landsat 8-9 OLI/TIRS images.

Table 2 .
Flood period: estimated classes of land cover types for the March period for the years 2021, 2022 and 2023 in the Ganges River Delta.

Table 3 .
Post-flood period: estimated classes of land cover types for the November period for the years 2021, 2022 and 2023 in the Ganges River Delta.