A new method for surface water extraction using multi-temporal Landsat 8 images based on maximum entropy model

ABSTRACT The spectral matching algorithm based on the discrete particle swarm optimization algorithm (SMDPSO) sometimes overestimates extracted surface water areas. Here we constructed a new method (MEDPSO) by coupling discrete particle swarm optimization algorithm with maximum entropy model (MaxEnt) to extract water bodies using Landsat 8 Operational Land Imager (OLI) images. To compare the accuracy of the modified normalized difference water index (MNDWI), SMDPSO, and MEDPSO, we selected six areas , i.e. thermokarst lakes, Coongie Lakes National Park, the Amazon River, urban water bodies mixed with buildings, Erhai Lake that is surrounded by mountains, and high-altitude lakes. Our results show that the average overall accuracy of the MEDPSO for the six areas is 97.4%, which is higher than those of MNDWI and SMDPSO. The average commission errors and omission errors of MEDPSO (6.4% and 0.8%) are lower than those of MNDWI and SMDPSO. The MEDPSO has a higher accuracy because the maximum entropy model is a machine learning method that uses all the bands of Landsat imagery and four surface water indices in the calculation of the probability of surface water. Our study established a novel, high-precision water extraction method.


Introduction
Water bodies are a fundamental component of the Earth system. Understanding the distribution of water resources is the first step for the management and utilization of water resources. Water resources are dynamic and can be greatly changed by human activities and climate change (Scanlon et al., 2007). Since field surveys of water bodies are difficult due to costs and logistics, satellite remote sensing data provide valuable information for monitoring water resources in many areas (Alsdorf & Lettenmaier, 2003). Presently, radar and optical remote sensing data have been widely used to extract water bodies (Ward et al., 2014). The radar remote sensing data include Radarsat, ENVISAT, Sentinel-1, and other data sources (Sinha et al., 2015), and the optical remote sensing data mainly include Landsat series, spot, WorldView series, GF series, and other medium-and high-resolution data (Haas et al., 2009). Among these data, synthetic aperture radar (SAR) and Landsat data are the most commonly used (Hong et al., 2015). In comparison with SAR data processing, Landsat data processing is relatively simple, and the data also have the advantages of a high resolution, a long time series, and being free of charge. Landsat data can be used to extract rivers, lakes, and coastlines at the regional scale (Feyisa et al., 2014;Yao et al., 2019).
Water extraction methods using remote sensing data can be divided into three categories: thresholding, machine learning (classifier), and deep learning. Based on the spectral differences between water and other ground objects, the thresholding method sets a certain threshold for a single band or multibands and then distinguishes between water and nonwater. This method can be subdivided into the single band method (Frazier & Page, 2000), multilane spectral correlation method, and surface water index method (Feyisa et al., 2014;Huang et al., 2018;Yang et al., 2015). Although the thresholding method has been widely used, the results from this method are usually affected by mountain shadows (Worden & de Beurs, 2020). Therefore, this method is only applicable in areas with relatively flat topographic relief (Bangira et al., 2019). Both machine learning and deep learning methods incorporate multiple data, including spectral, shape, terrain, and remote sensing images, to recognize water bodies. The widely used machine learning methods for water extraction are support vector machines (SVMs; Yu et al., 2017), decision trees (Acharya et al., 2016), and object-oriented segmentation methods (Roach et al., 2012). The SVM method has a high extraction accuracy, but the calculation is greatly affected by the study area and samples . The decision tree method greatly improves the accuracy, but this method still suffers from the effects of ice and snow and the effects of mountain shadows (Bangira et al., 2019). The object-oriented segmentation method requires two steps of image segmentation and image classification during the extraction, and the quality of segmentation and classification criteria directly affect the accuracy (Kaplan & Avdan, 2017). In addition, the shadow of urban buildings can also lead to errors in the extraction of urban water bodies (Zhang et al., 2014). Recently, a deep learning method was applied to surface water extraction (Yuan et al., 2020). This method can learn multiple spectral and spatial features without complex spectral analysis and feature selection and can also avoid the effects of shadows and buildings. However, the deep learning method can only be used for high-resolution remote sensing images, and it also requires a large amount of sample data for model training (Z. . Theoretically, the weaknesses of these methods mentioned can be improved by better training data, although obtaining more training data will also reduce the universality of the model and method. Based on the above description, it is obvious that various methods have been employed globally in water body extraction (Yamazaki et al., 2015). However, the thresholding method has difficulty extracting water bodies using the texture and shape features of remote sensing images, and thus, the accuracies are relatively low. The deep learning method requires many samples to train the model. The machine learning method can extract water bodies according to the spectral, texture, and shape features of remote sensing images, and this method only requires small samples. Therefore, the machine learning method is a useful tool in water body extraction.
Recently, the swarm intelligence optimization method has been incorporated into surface water extraction. For example, Li et al. applied the discrete particle swarm algorithm to remote sensing water extraction for the first time. They used ETM+ remote sensing images to extract floods in the Murray-Darling watershed in Australia and the Yangtze River in China. The results showed that for the discrete particle swarm algorithm (discrete particle swarm optimization, DPSO) in the two basins, the overall accuracy reached more than 80.0%, indicating that the DPSO algorithm is feasible in subscale flood extraction (L. Li et al., 2015). The group intelligence optimization method uses a group of individuals to find the optimal position within the search space (L. Li et al., 2015). Each D-dimensional particle in the DPSO represents a feasible solution of the fitness evaluation function T. The feasible solution has a position vector Xi = [Xi1, Xi2 . . ., XiD] and a change rate vector Vi = [Vi1,Vi2 . . .,ViD]. The DPSO method constructs a discrete particle swarm XiD composed of 0 and 1, and each Xi represents a 4 × 4 grid of water distribution. The fitness evaluation function combines the discrete particle swarm and the maximum entropy probability distribution to bestow the particle with water probability. The particle swarm with the water probability is evaluated by the T value to find the optimal Pid (the d-th dimension of the best fitted solution found by the i-th particle) and Pgd (the best fitted solution found by the entire group). The swarm intelligence algorithm has the following advantages: (1) great robustness, as there are no central control data, and the solution will not be affected by the failure of a few individuals, and (2) easy integration with other methods, as the algorithm can be easily integrated with other methods to improve the performance of the algorithm. Based on the DPSO method, Jia (Jia et al., 2018) proposed a method of spectral matching coupled with discrete particle swarm (spectral matching-based discrete particle swarm optimization, SMDPSO), which calculates the similarity between the standard spectrum of water and the spectrum of ground features (W. Xu et al., 2005) to determine the possibility that the ground features are water bodies. This method has higher water extraction accuracy in general environments, but it is easy to misjudge ground objects with spectral characteristics similar to those of water bodies as water bodies (Jia et al., 2018).
To reduce the errors of water extraction using the SMDPSO method, we coupled the maximum entropy model (MaxEnt) with SMDPSO. To compare the accuracy of this method with the modified normalized difference water index (MNDWI) and SMDPSO methods, we selected six areas with different environmental features to validate our proposed method. This study will provide a new method to extract water bodies using remote sensing data and will be helpful to improve our understanding of water resource changes in a warming climate.

Study area
The accuracy of a surface water extraction method is predominantly affected by the spectral and spatial diversity of the surface water and the heterogeneity of adjacent surfaces (Jia et al., 2018). Therefore, we selected six representative areas with typical background features to validate the different methods. The six areas include (A) thermokarst lakes in Tuktoyaktuk, Canada; (B) Coongie Lakes National Park, Australia; (C) the Amazon River in Manaus, Brazil; (D) urban water bodies mixed with buildings near Poyang Lake, China; (E) Erhai Lake, China, which is surrounded by mountains; and (F) highaltitude lakes located on the Qinghai-Tibet Plateau, China ( Figure 1).

Data
All the data used in this study are available free of charge from the United States Geological Survey (https://earthexplorer.usgs.gov/). The strip numbers and date of the images are shown in Table 1. The Landsat series of satellites were launched by the National Aeronautics and Space Administration (NASA) to implement the land satellite exploration program. Presently, the most widely used Landsat series images include TM images (Landsat 5 TM), ETM+ images (Landsat 7 ETM+), and OLI images (Landsat 8_OLI; Yamazaki et al., 2015). The OLI imager uses a push-broom design with an improved signal-to-noise ratio, and the radiometric resolution can reach 12 bits. All the data in this study are OLI remote sensing images. There are nine bands of OLI images, among which band 9 is employed for cloud detection, band 8 is a panchromatic image with a resolution of 15 m, and all other bands have a resolution of 30 m. The images were obtained

Data preprocessing
Satellite images can be affected by season, surrounding environment, sensor system error, and other factors, which can lead to certain radiation differences; thus, it  is necessary to perform radiometric correction. Radiometric correction refers to the correction of systematic and random radiation distortion or distortion caused by external factors, data acquisition, and transmission systems and the process of eliminating or correcting image distortion caused by radiation errors. The process includes radiometric calibration and atmospheric correction. Radiometric correction was performed using the Radiometric Correction/ Radiometric Calibration and Atmospheric Correction Module (FLAASH) in ENVI software. In this study, interactive data language (IDL) was used for the radiometric correction of 1-7 bands of OLI images. Landsat 8_OLI provides a view covering the 185 km swath width. There are usually very low proportions of water bodies in this image, resulting in an overestimated water extraction accuracy. Therefore, all images were cropped in pixels to multiples of 80 × 80 to obtain higher percentages of water surfaces. We selected images with thin or few clouds. The validation data were visually classified as water or nonwater to calculate the accuracy. Since the spatial resolution of Landsat images (30 m) is too large to identify small water bodies, Google Earth data were also used for visual interpretation since Google Earth data provide high-resolution overviews with historical images at different times.

Modified normalized difference water index (MNDWI) index
The MNDWI is an improved NDWI and is one of the most commonly used water indices (Xu, 2006). It is calculated from the normalized ratio of Green band and MIR band (Formula 1), which can remove the influence of buildings. It can also solve the problem of shadows included in the extracted water body and reduce the complicated process of removing buildings and shadows (Xu, 2006).
where Green represents the green light band and MIR represents the mid-infrared band. Since there are no MIR band data in the Landsat 8_OLI image, we replaced it with the shortwave infrared band (SWIR1).

Spectra matching based on discrete particle swarm optimization
Particle swarm optimization (PSO) is an intelligent swarm optimization algorithm based on iterative operation (Kennedy & Eberhart, 1995). It is a random search procedure guided by defined rules for multiple particles. Compared with other intelligent optimization algorithms, it has the advantages of simple processing, less parameter adjustment, easy implementation, and high efficiency. To extend PSO application to discrete problems, the DPSO was proposed, and it can find high-quality solutions (Kenedy & Eberhart, 1997). Spectral matching algorithms are widely used in various spectral analysis models (Q. Li et al., 2020). Distance similarity and angle similarity are commonly used: (1) the distance similarity is represented by the minimum distance, which measures the similarity of two bands by calculating the distance of the spectral band value between two pixels; (2) the angle similarity is represented by spectral angle matching, which measures the similarity of the spectral shape between two pixels by the cosine value (Wang et al., 2014). The SMDPSO algorithm selects a standard spectrum from remote sensing images to calculate the probability of surface water (Jia et al., 2018). The surface water probability P W is defined as the difference between the spectral curve of the target and the standard surface water spectral curve (Formula 2), which is expressed as the result of spectral angle similarity (Formula 3) and distance similarity (Formula 4). A greater spectral difference indicates a smaller probability of surface water. According to the surface water types of four types of climate and topography in the world ( (Jia et al., 2018). The probability of nonwater was calculated as follows (Formula 5): p ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi The values of spectral angle similarity and distance similarity range from 0-1, i.e. the probability of water is within the range of 0-1. P W is the probability of water in the pixel, and P NW is the probability of non-water. A higher P W value indicates a greater possibility of water. To make the DPSO algorithm sensitive to various surface features during water extraction, we divided water into four types according to the ratio of the probability mean (μ) and variance (σ) of water in the pixel since the land was continuous. The criteria of the four classifications are shown in Table 2.
The objective function (Formula 6) solved by the DPSO was used to identify water pixels in the image of surface water to extract water information.
maxT ¼ c 1 X rows�cols k¼1 P w;k þ c 2 X rows�cols k¼1 P nw;k À c 3 � D nearest ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi rows 2 þ cols 2 p (6) where Max T represents the T value corresponding to the historical optimal position in multiple cycles; C 1 , C 2 , and C 3 are the parameters according to Table 2, P w;k , P nw;k , and � D nearest , which represent the weight values of water, nonwater, and neighborhood pixels, respectively; P W represents the probability of water; P NW represents the probability of nonwater; and � D nearest represents the nearest distance from one water pixel to another water pixel in the same image. The process of summing is the process of judging whether the pixel is water or nonwater.

Maximum entropy model based on discrete particle swarm optimization
The maximum entropy theory was proposed in 1957 (Jaynes, 1957). The MaxEnt model software was developed based on the maximum entropy principle (Phillips & Dudík, 2008). There are two input files ( Figure 2): species distribution data stored in CSV format and environmental data stored in ASCII format from ESRI. In this paper, a certain number of points were randomly selected as species distribution data in the water area, and 1-7 bands of Landsat images, NDWI (Formula 7), NDVI (Formula 8), and AWEI (Formula 9) were calculated. Four indices (NDVI, NDWI, MNDWI, and AWEI) were used as environmental factors. In the Maximum entropy model, these indices are inputting factors and there is no need to set thresholds for these indices. When using MNDWI for delineating water features, the threshold was set as 0.25 according to previous literature, and this threshold is applicable for our study (Chen et al., 2020). The output results are as follows: the probability map of the surface water was calculated by the maximum entropy software, and the prediction accuracy of the MaxEnt model was evaluated by the area under the receiver operating characteristic curve (AUC) value of the subject working characteristics (Phillips & Dudík, 2008). Finally, the output with the highest accuracy was selected as the probability distribution map of the surface water and then optimized by the DPSO algorithm program to obtain water information.

Accuracy verification
The visual interpretation and confusion matrix were used to verify the accuracy. The extraction results of the surface water were overlapped on the original image, and 500 sampling points were randomly selected. Using the calculation of the position and Table 2. Values of C 1 , C 2 , C 3.

Rough classification
Analyzing conditions Type of surface water c 1 c 2 c 3 Category 1 μ/σ > 20 All water or nonwater 0.9 0.7 1.0 Category 2 3 < μ/σ ≤ 20 Water and land junction 1.0 1.0 1.0 Category 3 μ/σ ≤ 3 and μ ≤ 0.25 Tributary 2.0 0.5 1.5 Category 4 μ/σ ≤ 3 and μ > 0.25 Other, nonsurface water junction 0.9 0.5 1.0 μ indicates the mean of pixels in a tile with a size of rows×cols, σ indicates the standard deviation attribute of the points, the confusion matrix of the real category and the predicted category were obtained (Table 3). The overall accuracy calculation is: where N represents the total number of samples; and a ij represents the number of samples in which the real value is i and the predicted value is j;

Visual interpretation of SMDPSO and MEDPSO extraction results
Based on the SMDPSO method and the coupled maximum entropy model discrete particle swarm optimization (MEDPSO) method, the water information was extracted in six study areas. The MNDWI, SMDPSO, and MEDPSO performed well overall in the Tuktoyaktuk area, Coongie Lakes area, and Manaus area ( Figure 3). However, as indicated by the red box in the Tuktoyaktuk area, the MNDWI and SMDPSO methods mistook some shoals for surface water, and the extracted surface water was larger. The MEDPSO accurately identified and extracted all small water areas. For the Coongie Lakes area, which has small water areas, the mixed pixels were mistakenly classified as nonsurface water into water by the MNDWI and SMDPSO methods when there were sporadic surface water bodies (indicated by the red boxes). In contrast, the MEDPSO method accurately distinguished the shoals from the surface water.
In the Manaus area, all the MNDWI, SMDPSO, and MEDPSO methods performed well in water extraction. The MNDWI and SMDPSO methods missed only a small area of water, as indicated by the red boxes. For the Poyang Lake area, the complex ground features included ponds, vegetation, residential areas, and other ground objects. In the red boxes, the MNDWI and SMDPSO methods mistakenly classified clouds and buildings. The MEDPSO method accurately separated surface water from clouds and buildings and suppressed the noise from residential areas and soil. In the Erhai Lake area, the MNDWI and SMDPSO methods failed to accurately distinguish between mountain shadows and surface water, and these methods missed the water area in the red box.
However, the MEDPSO method extracted surface water information completely. On the Qinghai-Tibet Plateau, the MNDWI and SMDPSO methods classified ice as surface water because the ice has spectral characteristics similar to those of surface water, while the MEDPSO method had a higher accuracy in surface water extraction. Obviously, the boundary of the surface water was smooth.

Accuracy assessment of MNDWI, SMDPSO and MEDPSO
The overall accuracy (OA) was used to assess the accuracy of water area extraction in six regions ( Table 4).
The accuracy of the MEDPSO method in the six study areas was higher than that of the MNDWI and SMDPSO methods. The extraction accuracy of the MEDPSO method in the Qinghai-Tibet area was the highest, with an overall accuracy of 99.4%. The lowest extraction accuracy was recorded in Poyang Lake, with an overall accuracy of 95.9%.

Discussion
Accurate water extraction is an extremely complex problem that needs to be solved because it can be affected by many factors varying from data collection to methodology. In comparison with previous reports conducted in similar or identical experimental areas (Jia et al., 2018;Shen et al., 2012;Verpoorter et al., 2014), the MNDWI and SMDPSO methods have higher accuracy in water extraction in areas containing shadows and dark vegetation, although the previous studies still misclassified some shallows and vegetation into water bodies (Shen et al., 2012;Verpoorter et al., 2014). The MNDWI and SMDPSO methods distinguish surface water from other ground objects according to the spectral characteristics of the ground features and thus mistake some ground features with similar spectral characteristics such as ice, clouds, and shallows for surface water (Jia et al., 2018). For the MNDWI method, the ratio of the green band to the mid-infrared band was calculated, and this method can suppress the vegetation information, but the manual setting of appropriate thresholds is required, making it time-consuming. In addition, the threshold values varied considerably among different studies (Feyisa et al., 2014). In comparison with MNDWI, the SMDPSO method requires no manual intervention during water extraction, and the parameters are constant (Jia et al., 2018;Wei et al., 2020). In this study, the MEDPSO method utilized the 7 wavebands and 4 surface water indices, and the extracted surface water body has a higher accuracy and smoother boundary. This is especially true for the extraction of small water bodies, shallows, and dark vegetation, as MEDPSO can accurately distinguish ice, snow, clouds, shadows, and water bodies.
The MEDPSO method comprehensively utilized the 7 bands of remote sensing images and the 4 water indices, but not all these data were useful (Table 5). In some areas with simple backgrounds, the relative contributions of some bands were zero. Therefore, the use of 11 environmental factors may be unnecessary for some areas. In future work, some environmental factors may potentially be replaced or removed to obtain a higher efficiency of water extraction.

Conclusions
The main goal of this research is to adopt a new method to improve water extraction accuracy by comprehensively using band information and the water body index, especially in areas with shallows, dark vegetation, small ponds, shadows, ice, and clouds. Using Landsat 8_OLI data, the newly proposed MEDPSO method was used at 6 global test areas. Compared with the MNDWI and SMDPSO methods, the overall accuracy assessment showed that the MEDPSO method improved the accuracy of water extraction, and the classification errors from the shadows, ice, and clouds were reduced. In addition, this method does not require the manual setting of thresholds. Therefore, the MEDPSO method is potentially a useful tool for water extraction with high accuracy for areas that may be affected by shadows, ice, and cloud noise.

Disclosure statement
No potential conflict of interest was reported by the author(s).

Funding
This work was supported by the National Natural Science