2. Study Area
This study is located in the coastal area of Mozambique, western part of the Indian Ocean. Specifically, it investigates the region of the Bight of Sofala, where the estuary of the Beira river enters the Mozambique Channel (
Figure 1).
As one of the developing countries of Africa, Mozambique is notable for its rapid land cover changes related to the environmental effects and urbanization. As a result, landscape dynamics have recently become one of the major issues of the country, which is reported in many relevant studies [
61,
62,
63]. Located on the southeast coast of Africa, Mozambique represents a country with diverse topographic forms and landscape setting. The most remarkable geomorphic features include a complex mix of the inland hills and low plateaus situated along the narrow coastal strip which contrast with rugged highlands located in the western parts of the country. Such variability in landscapes favors diversified vegetation structures, increases the biodiversity richness, and creates unique land cover patterns that are characteristic of Mozambique (
Figure 2).
The major geomorphic types of Mozambique include numerous highlands interspersed with plateaus; covered with woodlands; and lowlands, which are situated mostly to the south of the Zambezi River—the major river of the country. The Zambezi River roughly separates the country into the northern and southern parts, which have notably distinct ecosystems. Being the fourth-longest river in Africa with a complex hydrological setting, it largely affects the distribution of plants and species in the surrounding landscapes and in the estuary zone, which is located to the north of the Bight of Sofala [
64,
65,
66]. The hydrology of the Zambezi River is connected to the main channel and tributaries, and water management involves the eight countries surrounding the basin [
67]. Thus, through the downstream and upstream movement of water that changes the local salinity and suspended sediments, the hydrology of Zambezi strongly influences the coastal ecosystems of the Sofala Bank [
68]. Nevertheless, the recent construction of artificial dams has had significant environmental effects on the major floodplains. For instance, these include reduced water supply and river discharge [
69] and increased sedimentation of the coastal landscapes of its estuary [
70].
The coastal ecosystems in the Bight of Sofala are one of the most environmentally vulnerable regions in Mozambique. This is caused by multiple impacts from the climate setting and tidal hydrology [
71] including tidal cycles, shelf circulation, and coastal currents [
72]. In turn, the hydrological setting of the coastal ecosystems influence the patterns of primary production and the distribution of zooplankton, phytoplankton, and nutrients in the shelf waters [
73]. Moreover, the rapid expansion of urban areas caused by population growth and economic pressure changes the landscapes. Such social processes result in urban sprawl, which changes the natural landscapes into artificial spaces [
74]. Moreover, the Sofala Bank is known for its industrial shallow-water shrimp fishery [
75,
76,
77], which creates additional pressure on the coastal ecosystems through the overexploitation of natural resources.
The repeated and severe floods and cyclones in western part of the Indian Ocean have a great influence on the landscapes and distribution of vegetation along the coasts of Mozambique. As a result, Mozambique is reported to be one of the most vulnerable south African countries to flooding and tropical cyclones. Such climatic hazards cause damage to the infrastructure and create additional factors to the disruption of ecosystems [
78,
79,
80]. Another environmental issue in the coastal regions of Mozambique concerns the decline of mangroves, which is caused by the cumulative effects from anthropogenic activities and climate change [
81]. At the same time, as highly productive coastal ecosystems with unique fauna and flora, mangrove swamps are important sources of natural resources and livelihoods for local people. Therefore, their decline and degradation negatively affect the sustainability of coastal ecosystems.
Over recent decades, the consequences of floods in Mozambique include the destruction of landscape structures [
82] and crops during the flood period [
83]. Moreover, this increased landscape fragmentation resulted in the continuous physical disintegration of habitats into smaller patches with decreased size and isolation between habitat clusters. The consequences of such processes negatively affect the biodiversity and species richness [
84] as well as lead to disruptions in the coastal ecosystems [
85]. In terms of social–economic aspects of Mozambique, climate-related natural hazards and disrupted landscapes affect the farming sector, fishery, and agriculture activities in the coastal areas of Mozambique.
All these factors are required for an effective environmental monitoring system. Specifically for the coastal regions of Mozambique, a data analysis enables us to define the cost of landscape restoration in the affected areas and to detect land cover changes. Proper land planning in the coastal areas of Mozambique requires the costly process of evaluating landscape dynamics, performing a climate change assessment, and carrying out an integrated socio-environmental analysis [
86,
87,
88,
89]. The lowest possible cost when monitoring the coastal areas of Mozambique can be achieved by evaluating the difference between land cover types and performing a patch analysis using the image classification and quantification of landscape fragments [
90]. This is possible using cartographic mapping and a time series analysis of the satellite images [
91,
92,
93]. Land surface topography, which varies significantly in Mozambique, influences the distribution of vegetation types that can be considered in agricultural planning, environmental management, and ecological monitoring of the coastal regions. For instance, to preserve the vulnerable ecosystem of the narrow strip along the coasts of the Bight of Sofala, operative monitoring using remote sensing data is a useful technical tool [
94].
3. Materials and Methods
3.1. Workflow
In this paper, multi-temporal Landsat 8–9 OLI/TIRS images were used for land cover mapping in the coastal region of the Bight of Sofala, eastern Mozambique, Indian Ocean. The methodology included the extraction of the training data from raster images, supervised ML using ensemble classification, the regression tree method using RF, and cross-validation tasks. A schematic view of the workflow in cartographic and remote sensing tasks is portrayed in
Figure 3.
The workflow was completed using GRASS GIS software and includes the following 14 steps:
Image importation and interpretation using the Geospatial Data Abstraction Library (GDAL) and reprojection of images: Since all the images must be registered in the software and be coherent with each other, the registration procedure of the Landsat images was performed using the ‘r.import’ module. The metadata of the satellite images were set to the current region and checked to assess the suitability and quality control: data acquisition, cloudiness, sun elevation and geographic extent. Technically, this was carried out using the code “r.import input=/Users/<path>/ImageName.TIF output=ImageName extent=region resolution=region”. Here the path to the original image is provided in full; the resolution was set to the 30 m as for Landsat scenes.
Image preprocessing is a fundamental approach in remote sensing data analyses. It aims to prepare the images for further processing and analyses. Here, the Landsat images were integrated with GDAL and preprocessed using the ‘i.landsat.toar’ module, which calculates the top-of-atmosphere spectral reflectance and temperature for Landsat OLI/TIRS scenes. To this end, the information on sun elevation and the date of image acquisition were used from the metadata (product date). The digital numbers (DN) of the image pixels were converted to the top-of-atmosphere radiances (ToAR). The resulting output images were processed using the ‘i.landsat.toar’ module and the DN of the images were transformed, which calibrated the top-of-atmosphere reflectance.
To analyze the land cover types visible on the Earth’s surface as a representation landscape patches, color composites were created using bands of the satellite images. The image composites were generated using ‘r.composite’ for natural and false color composites using triplets of red, green, and blue bands merged into a single composite raster map by the following code (the example is for the band combination 7-5-3): “r.composite blue=L807 green=L805 red=L803 output=L8753 –overwrite”. Here, each band was selected for each of the RGB triplets (red, green, and blue), which enabled us to visualize the images in various combinations (natural and false color composites).
The landscapes of coastal Mozambique are characterized by a complex mosaic of heterogeneous land cover types that exhibit structural similarities in spectral reflectance. Therefore, a radiometric partition of the images was performed using the unsupervised k-means method with the ‘i.cluster’ module which employs computer vision techniques for objective and automatic recognition of land cover types. This method generates spectral signatures for different land cover types using a clustering algorithm that identifies the differences between various values of spectral reflectance for each pixels and assigns them to classes accordingly.
The generation of signature files for land cover types was performed using the ’signaturefile’ function of the ‘i.cluster’ module. The profiles of the spectral backscatter coefficient of the land cover types were generated and compared to the FAO classification with 10 major identified land cover classes in the coastal regions of Mozambique. Various characteristics of landscape patches were identified and compared for images taken at different periods as a time series.
Image classification was performed to identify land cover classes using the maximum likelihood method (‘i.maxlike’ module). This method was selected due to its versatility and ability to produce fast and accurate results. In essence, the MaxLike classification algorithm uses clusters generated in the previous step and classifies pixels in an iterative self-organizing process of image partition to produce a set of spectral classes. Afterwards, labels are assigned to the clusters automatically and maps are generated using a defined color palette.
The generation of training pixels from an older land cover classification using the ‘r.random’ module was performed to generate a set of raster point maps. This module creates a raster map which contains coordinates of points whose locations have been randomly determined to ensure the objectivity and randomness of the representative set of pixels. It includes randomly located cells and pixel points using a non-deterministic random seed. Technically, it was implemented by the following code: “r.random input=L8CL seed=100 npoints=1000 raster=L8CLroi”.
The creation of an imagery group with all Landsat OLI/TIRS multispectral bands that have 30 m resolution, excluding panchromatic bands: this was performed using ‘i.group’ module with the following code: “i.group group=L82015 input=L801,<...>,L807”.
A random forest classification model was trained using the ‘r.learn.train’ approach of the ML modules of the GRASS GIS. Practically, it was implemented using the following code: r.learn.train group=L82015 training_map=L82015roi.
model_name=RandomForestClassifier n_estimators=500 save_model=rf_model.gz
Performing predictions using the ‘r.learn.predict’ module of GRASS GIS: This is an essential part of the ML data processing that uses a fitted Scikit-Learn estimator derived from Python to raster layers in a group of images. The implementation was performed using the code “r.learn.predict group=L8_2015 load_model=rf_model.gz output=rf_classification –overwrite”. The algorithm uses the training dataset generated in a previous step and applies the created model “rf_model.gz”. The main goal is to apply a fitted estimator from the Python’s ML library Scikit-Learn to the imagery group which was generated during the step “i.group”.
Checking raster categories using the module ‘r.category’: The category values and labels are displayed for the raster layer requested for the generated images. This is carried out by the command “r.category rf_classification”, which reports the data in the console output. In this case, 10 major land cover classes of the coastal area of Mozambique were identified by the computer vision, which were automatically applied to the classification results.
Visualization of the results was performed using the GRASS GIS module ‘r.colors’, which copies the color scheme from the land class training map to the output maps. For instance, the code for the maps of random forest classification was as follows: “r.colors rf_classification color=plasma-e”.
The results were mapped using a set of modules—‘d.rast’, ‘d.legend’, and ‘d.mon’—that represent the cartographic tools of GRASS GIS for mapping and the visual display of data. The files were then saved using the module ‘d.out.file’ as bitmap graphics. For instance, data visualization included the following snippets of code: “d.rast rf_classification d.legend raster=rf_classification title=“Random Forest: 2018” title_fontsize=14 font=“Helvetica” fontsize=12 bgcolor=white border_color=white”.
Interpretation of the results was based on the comparison of maps of land cover types of the Bight of Sofala, Eastern Mozambique, for 2015, 2018, and 2023 to analyze the spatio-temporal dynamics of land cover types in the coastal landscapes.
3.2. Data
In this study, three multi-temporal images of the Landsat Operational Land Imager and Thermal Infrared Sensor (OLI/TIRS) were selected to produce a classification using machine learning. The images were chosen due to the high quality of the data, availability of the high-quality ’leaf-on’ data on coastal Mozambique, and coverage of the study area. The most essential technical characteristics of the images are summarized in
Table 1.
The images are presented in
Figure 4. Low cloudiness and acceptable resolution depend on the acquisition techniques of Landsat ensured by the United States Geological Survey (USGS).
The values of the cloud coverage were 0.01, 0.11, and 0.69 for the images from 2015, 2018, and 2023, respectively. The original satellite images are stored in Universal Transverse Mercator (UTM) Zone 36 for Mozambique. The terrain data of the study area used for topographic visualization are based on the General Bathymetric Chart of the Oceans (GEBCO) grid with high spatial resolution and accuracy (15 arc seconds) and visualized as the digital terrain model Shuttle Radar Topography Mission (SRTM). The topographic names are added according to the gazetteer of Digital Chart of the World (DCW).
3.3. Software
Traditional image processing methods rely on the use of GIS [
95,
96,
97]. However, such methods have some drawbacks in that the human-controlled maintenance of workflow is required for image processing, classification, and analysis, which might be hard in case of image series. In contrast, script-based image processing uses the automation of data processing to derive information from the RS data [
98]. An alternative approach is presented by machine learning (ML), which can be used as a descriptor of pixel values and partial replacement of the traditional methods using programming [
99,
100]. The ML is based on the algorithms of artificial intelligence, which include computer vision and statistical analyses. This study applies ML using the latest available version of GRASS GIS 8.3.1.
The installation of the program was performed using the ‘sudo port install grass’ with compilations, which includes the dependencies of the essential Python’s libraries and ML packages. The programming is implemented in the GRASS GIS as scripts. This automates the repeated steps of image processing to improve the workflow [
101,
102]. The data processing was performed on the MacBook Apple Sonoma (arm64 architecture). The Cooperative Computing Tools (CCTools), which enable large-scale distributed computations from clusters, were updated and installed using the sudo command as follows: ‘sudo port clean cctools’ and ‘sudo port -v install cctools’. After the CCTools and XCode were installed and activated, all the necessary updates in the libSystem of MacPorts were performed including the deactivated library libunwind-headers: ‘sudo port -f deactivate libunwind-headers’.
To employ the enhanced properties and improved functionality of GRASS GIS adjusted for satellite image processing, the Python-based modules and the toolchain GNU Compiler Collection (GCC) were used. The GCC 13 was installed accordingly for code compilation, supporting library dependencies through linking and conversion of GRASS GIS scripts into the binary executable format for assembly into executable files. The wxPython was installed additionally using the ‘sudo port install py311-wxpython-4.0’ command called from the MacPorts. The topographic map of the study area was made using the Generic Mapping Tools (GMT) software developed by [
60], which represents a toolbox for geospatial data processing. The method used for mapping includes scripts that were derived from earlier works [
103,
104,
105].
3.4. Scripting
The advanced script-based cartographic ML methods of the GRASS GIS for monitoring and mapping land cover types were built due to the growing demand for time- and cost-effective approaches in the cartographic workflow and remote sensing data analyses. It enables users to save time and resources while processing the geospatial datasets and to use open-source satellite images. Three major script-based toolsets were used in this study for the geospatial data analysis and environmental monitoring of West Africa:
GRASS GIS module ‘r.import’ was used for importing the data, Listing 1;
GRASS GIS module ‘r.composite’ was used for creating false and natural color composites, Listing 2;
GRASS GIS modules of ‘i.cluster’ and ‘i.maxlik’ were used for unsupervised image classification and accuracy assessment by computed rejection probability classes for classified pixels, Listing 3;
A combination of GRASS GIS modules ‘d.rast’, ‘d.legend’, ‘r.colors’, ‘d.mon’, ‘g.region’, and ‘d.out.file’ was used for mapping the output images, Listing 4;
GRASS GIS module ‘r.learn.train’ was used for random forest classification of machine learning (ML)-based supervised image classification using the training data generated in a previous step, Listing 5.
The main idea of this framework is to perform in a single workflow both image processing and mapping using scripts run from the console. This enables a user to reveal the technical performance of the automated geospatial data processing using a programming approach with three different programming suits of the script-based software. Such an approach demonstrated that the inclusion of scripts speeds up cartographic plotting and image processing and facilitates the research methodology. As mentioned earlier [
106], the main advantage of scripts consists in automation of the process and repeatability of the workflow, which saves time. Using the information received from the automated image analysis and interpretation, we were able to detect the changes in the analysis of the landscapes of eastern Mozambique for evaluation of the environmental effects from climate change. This was achieved through a time series analysis of the satellite images taken for different years (2015–2023).
First, the GRASS GIS was started from the console, and then, the bands of the Landsat-8 OLIimage on 2015 were imported stepwise using the ‘r.import’ module, as shown in the script of Listing 1. The same algorithm was repeated for the Landsat images for 2018 and 2023.
Listing 1. GRASS GIS code for importing satellite images. |
|
Second, the color composites were created using Listing 2 for false and natural color composites with the case of an image from 2015. While true color composites show a representation of the Earth visible naturally to human eyes, false color composites better display selected features on the Earth (e.g., discrimination between water and land surfaces). This is done through a combination of visible red, green, and blue bands that correspond to the multispectral channels of the images.
Listing 2. GRASS GIS code for creating color composites. |
|
Third, the next step included clustering the image using the ‘i.cluster’ module. The computational region was set to the band of the Landsat image to match the scenes of the satellite images. The bands of the Landsat channels were grouped using the ‘i.group’ module, which is designed for grouping the data. The selected bands were used as grouped data during the clustering process. The signature file was generated using the ’signaturefile’ command. The image was classified into the 10 major classes of the classification scheme using the information from FAO. The unsupervised automated classification was performed using the ‘i.maxlik’ module. The complete script of this process is shown in Listing 3.
Listing 3. GRASS GIS code for grouping bands and clustering. |
|
Mapping and visualization of the output data was performed using a combination of the GRASS GIS modules ‘d.rast’, ‘d.legend’, ‘r.colors’, ‘d.mon’, ‘g.region’, and ‘d.out.file’, as shown for the Landsat image 2023 for a map produced using the classification and accuracy assessment with rejection probability classes (Listing 4). The same procedure was repeated for images taken in 2018 and 2023, respectively.
Listing 4. GRASS GIS code for data display, visualization and mapping. |
|
The accuracy assessment for the unsupervised classification was performed using the ’reject’ function of the ‘i.maxlik’ modules of GRASS GIS, which calculates the output raster map holding the reject threshold results. The aim of this step is to evaluate the confidence level at which each cell in the raster image is categorized during the classification process. The algorithm generates the reject threshold map layer, which contains the index to a computed confidence level for each classified pixel in the satellite scene. The predefined confidence intervals include sixteen values. The rejection probability image indicated the values of pixels between the acceptable at one, i.e., the pixel is kept up to 16, which means that the pixel is rejected.
The final part of the workflow included the machine learning (ML) approach of random forest (RF) classification of GRASS GIS, which was performed using a set of modules: ‘r.random’, ‘r.learn.train’, ‘r.learn.predict’, ‘r.category’, and auxiliary modules of data processing and visualization (Listing 5).
Listing 5. GRASS GIS code for random forest classification of the Landsat 8–9 OLI/TIRS images using machine learning (ML) approach of remote sensing data processing. |
|
The training of a random forest classification model was performed using ‘r.learn.train’. The training data were generated from the previous step of land cover classification. The scheme of the training pixels was applied to perform the classification on the target satellite image. The prediction was performed using the ‘r.learn.predict’ module of the GRASS GIS.
4. Results
The color composites created using a combination of bands for false and natural color composites are shown in
Figure 5 with the case of an image from 2015. The image dates were distributed throughout the important stages of the vegetation growth period in order to obtain temporal profiles of each kind of land cover type to analyze the separability among classes. The particular characteristics of Mozambique consists of its longitudinal extent, with the coastline stretching for ca. 2000 km, 11° S to 27° S. Moreover, the effects from tropical ocean currents were directed southwards along the length of the country influence environmental setting. Therefore, regional characteristics naturally differ within the country.
Weather patterns in Mozambique vary due to the global warming and increase in temperature. Nevertheless, the whole country broadly follows a southern African weather pattern: wet period with heavy rainy between November and March and dry period from April to late November. Since Mozambique has a tropical climate which has two distinct seasons, the images were taken during the dry period. Better cloudiness conditions and dense vegetation coverage were observed during dry season, as shown in the images.
The results of the classification are shown in
Figure 6. They were used as training data for the next step of random forest (RF) modeling, which requires seed data. The land cover types include the following classes: (1) mosaic cropland vegetation, (2) artificial surfaces and associated areas; (3) rain-fed croplands; (4) open grasslands; (5) sparse vegetation; (6) broad-leaved deciduous woodland; (7) mosaic forests, grassland and shrubland; (8) water areas; (9) needle-leaved deciduous evergreen forests; and (10) repeatedly or permanently flooded lands in brackish waters with broad-leaved forests or shrub lands. The coastal areas are characterized by grassland or woody vegetation distributed in areas of soil regularly flooded by fresh, brackish, or saline water.
Figure 7 shows the result of a chi square test on the accuracy assessment of the classification on each discriminant result at various threshold levels of confidence. The aim of the chi square test is to determine if a correlation exists between two qualitative variables and if the existing associations are statistically significant. When using the maximum likelihood classification method to classify the land cover types, the accuracy of the classification depends on the quality of the training dataset and technical parameters of the satellite image. Thus, evaluating the accuracy analysis presents an important step in classification. The approach to accuracy assessments is based on the function embedded in ‘i.maxlik’, where pixels are classified according to the probability of their correct assignment to each land cover class.
As can be seen in
Figure 7 showing reject threshold results, the lowest rejection values on the raster maps for three years—2015, 2018 and 2023—indicate the correctly classified pixels while the highest rejection values indicate the erroneously classified pixels. The analysis of
Figure 7 indicates that the majority of the correctly indicated pixels belongs to the river and inner water classes as well as vegetation types with distinct separability properties. In contrast, the least secure pixels belong to the tidal region in the coastal waters due to the spectral properties of shelf water areas where pixels might be misclassified and with other land cover types due to the high similarity of spectral reflectance values.
This method is suitable for providing a sufficient estimation on the accuracy of training samples that were used for the final steps of classification using random forest. The resulting images of the random forest classification of Landsat 8–9 OLI/TIRS images by the ML approach of GRASS GIS for the years 2015, 2018, and 2023 are presented in
Figure 8.
Figure 8 shows the results of the land cover type classification of the coastal region of Mozambique performed using the RF classifier approach of the ML method in GRASS GIS. The land cover types in Mozambique were selected for random forest classification with the estimator settings tab, providing access to the most pertinent parameters. These affect the previously described algorithms, where landscape patches were classified using the maximum likelihood classifier. The embedded Scikit-Learn library of Python contents provide the estimator parameters that are supplied for classification. These parameters were tuned using a grid search in the Landsat raster maps by inputting multiple regressors. This enabled us to indicate the representativeness of the land cover classes, uniformity or heterogeneity of patches, and the classification of pixels located far from the edges of the raster scene.
The ML approach by the Scikit-Learn library of Python ensures that the confusion of image pixels is avoided as much as possible compared to traditional classification methods. Moreover, training pixels generated during clustering and used to perform the RF-based classification separated the images into clusters of pixels. These groups were used both as a decision tree training seed dataset for random forest classifiers and as a post-classification accuracy assessment. In this way, the RF method avoided biased reference information of the group of pixels.
5. Discussion
In this study, the ML method of random forest classification of GRASS GIS was applied for the processing and analysis of three Landsat 8–9 OLI/TIRS images with the aim of land cover mapping in the coastal region of the Bight of Sofala, Mozambique. Quantitative image processing and interpretation are not easy tasks due to the complex function of multiple factors. These include, for instance, technical parameters of the image (sun, sensor, and target geometry), regional environmental effects (cloudiness, wetness, heterogeneity, diversification and fragmentation of landscapes, topographic ruggedness, and slope curvature) as well as sensitivity to leaf characteristics [
107]. The ML approach of GRASS GIS enabled us to perform a quantitative image classification using the random forest algorithm, which evaluated the similarity of pixels and assigned them into classes using the ‘r.learn.train’ module. The statistical information was obtained from the raster data analysis to represent the land cover types in Mozambique for the years 2015, 2018, and 2023.
Such an algorithm enabled us to model clusters of pixels, which were used to compare the climate effects that cause changes in land cover classes and lead to spatio-temporal landscape dynamics. This was achieved using the ensemble classification achieved by the random forest approach. Each tree in this ensemble was based on a random subsample of the training data that were initially obtained using the unsupervised classification as a part of data processing. This work is comparable with investigations performed by the authors of related works, for instance, those in [
108,
109].
Similar research [
110,
111,
112] investigated the complementarities of the ML approach for mapping coastal regions using a set of multi-resolution imagery from the Sentinel-2 Multispectral Instrument (MSI) and Landsat-8 OLI. To continue these studies, the experiments on image processing using the random forest approach reported in this article investigated the landscape dynamics in the study area of eastern Mozambique. This was achieved using a randomly selected subset of the predictors available during each node split in the ML-based classification method of GRASS GIS. Other studies [
113,
114,
115] used a neural network as a technical approach to the classification of vegetation and land cover types. Such a technique of remote sensing data processing aims to classify the land cover types using ML methods and reports high accuracy. Hence, we used the emerging technologies of scripts and programming algorithms for image processing through a set of GRASS GIS modules.
The demonstrated workflow was developed using a short series of the Landsat images. These images had various combinations of pixels which were evaluated by the ML methods to analyze the land cover changes using prediction analyses. Each tree of the algorithm produced a prediction. The final result of the image analysis was obtained by selecting the mean values across all of the trees in the Landsat image raster using computer vision. In other studies, a decision tree classifier was adopted to the RS data processing for automatic classification using diverse software. For instance, Ref. [
116] used the ensemble techniques of boosting and consensus filtering of the training data to improve the quality of the training dataset. Ref. [
117] compared the integrated use of the three classification schemes based on RF, DL neural network, and convolutional neural network to distinguish urban, natural, and heterogeneous landscape patches. Likewise, the ExtraTreesClassifier has been used as a variant of the GRASS GIS ML algorithm. Here, each node split during image processing includes the selected splitting rule, which is based on the most optimal solution.
Such optimization applied to several randomly generated thresholds by the random forest method presented advantages over the traditional unsupervised methods of image classification when generating classes for image classification. For instance, Ref. [
118] reports that the parameter-adjusted decision tree ensembles and RF ensembles performed well for image segmentation and supervised and outperformed other approaches. Likewise, the updates in the algorithms were reported using the improved decision tree algorithm based on the fuzzy approach for a technical improvement in the performance [
119]. Although the study presented here is not intended to suggest that scripting methods replace the traditional GIS, the integration of the scripting workflow of GRASS GIS with a satellite image analysis and cartographic plotting provides a more effective approach. This study demonstrated that the programming codes supplement the traditional cartographic methods used in the remote sensing software for monitoring coastal areas. Moreover, this work illustrated how the analysis of land cover changes can be visualized in the automatic way using ML algorithms of GRASS GIS.
6. Conclusions
The application of programming for RS data processing provides new perspectives in cartographic data processing. Such approaches are useful for mapping complex landscapes in the entanglement of human-based factors and environmental processes that affect coastal ecosystems. In view of this, the current study presented advanced mapping approaches to spatial analysis and visualization of the RS data. The use of the ML and intelligence classifiers of GRASS GIS increased the accuracy and precision of the produced thematic maps through the high level of automation. Moreover, it improved the performance of tasks using diversified modules and the application of RF algorithms for land cover classifications. The satellite images were classified using the unsupervised and supervised methods of the ML modules of GRASS GIS, including the random forest classifier.
The Bight of Sofala, located in the eastern coastal part of Mozambique, was selected as the test area due to the variability and high heterogeneity of landscapes with a complex mosaic of landscape patches. Ten types of land cover classes were identified on the Landsat satellite images collected in the years 2015, 2018, and 2023. The data were classified using the random forest algorithm of the machine learning (ML) methods supported by the Scikit-Learn library of Python integrated with GRASS GIS. The clustering approach of the machine-based classification was employed for training and validation of the result of the RF classification. The benefits of the RS data used for environmental monitoring consist of the fact that they provide an efficient way to map and visualize remotely located regions such as coastal regions in East Africa. Scripts used as a methodological benchmark of the automated image processing and cartographic workflow enabled us to focus on the analysis of the coastal landscapes of Mozambique.
The coastal region of the Bight of Sofala and its surroundings were analyzed using the classified series of satellite images in Landsat with the applied methods of automated data analysis of the ML approach. The advantage of the proposed algorithms of GRASS GIS scripts consists of their repeatability and applicability. The use of the supervised classification by the ‘r.learn.train’ module can be extended to other regions and environmental applications where satellite image processing is required. In this way, the ML method classification of landscapes can be applied in studies that use a multi-temporal set of images. The advanced approach of the GRASS GIS scripts was introduced to evaluate the environmental properties of the coastal landscapes of Mozambique. Changes in land cover types caused by climate effects in East Africa were visualized using image processing by the GRASS GIS modules ‘r.learn.train’ , ‘i.cluster’, ‘i.maxlik’, and other auxiliary modules.
The results visualize the dynamical behavior of land cover types in the coastal landscapes of Mozambique caused by climate effects, which act as drivers for desertification and land degradation in the coastal ecosystems of East Africa. We also discussed the ways in which the ML methods technically contrast with the traditional methods of the unsupervised classification. For instance, these use k-means clustering as an approach to image analysis for evaluating landscape changes using a series of images taken on different dates. Thus, it has been demonstrated that the ML approach of GRASS GIS has high automation in the sequential image processing workflow, which enables the effective use of RS data for environmental monitoring of coastal regions.