A Novel GIS-Based Approach for Automated Detection of Nearshore Sandbar Morphological Characteristics in Optical Satellite Imagery

: Satellite remote sensing is a valuable tool for coastal management, enabling the possibility to repeatedly observe nearshore sandbars. However, a lack of methodological approaches for sandbar detection prevents the wider use of satellite data in sandbar studies. In this paper, a novel fully automated approach to extract nearshore sandbars in high–medium-resolution satellite imagery using a GIS-based algorithm is proposed. The method is composed of a multi-step workﬂow providing a wide range of data with morphological nearshore characteristics, which include nearshore local relief, extracted sandbars, their crests and shoreline. The proposed processing chain involves a combination of spectral indices, ISODATA unsupervised classiﬁcation, multi-scale Relative Bathymetric Position Index (RBPI), criteria-based selection operations, spatial statistics and ﬁltering. The algorithm has been tested with 145 dates of PlanetScope and RapidEye imagery using a case study of the complex multiple sandbar system on the Curonian Spit coast, Baltic Sea. The comparison of results against 4 years of in situ bathymetric surveys shows a strong agreement between measured and derived sandbar crest positions ( R 2 = 0.999 and 0.997) with an average RMSE of 5.8 and 7 m for PlanetScope and RapidEye sensors, respectively. The accuracy of the proposed approach implies its feasibility to study inter-annual and seasonal sandbar behaviour and short-term changes related to high-impact events. Algorithm-provided outputs enable the possibility to evaluate a range of sandbar characteristics such as distance from shoreline, length, width, count or shape at a relevant spatiotemporal scale. The design of the method determines its compatibility with most sandbar morphologies and suitability to other sandy nearshores. Tests of the described technique with Sentinel-2 MSI and Landsat-8 OLI data show that it can be applied to publicly available medium resolution satellite imagery of other sensors.


Introduction
Nearshore sandbars are elongated sandy ridges acting as natural barriers that safeguard subaerial beaches in many coastal environments [1,2]. These morphological features are deposited by waves and nearshore currents; they form in shallow waters up to 10 m depth along a wide range of environmental settings, from non-tidal to macrotidal regimes [1,[3][4][5]. Sandbars vary in size, from tens of centimetres to six meters in height [6][7][8] and extend from tens of meters to tens of kilometres [7,9,10]. They exhibit diverse morphologies from longshore parallel to crescentic or transverse [5,11] and move in cross-shore and longshore directions, demonstrating daily, seasonal and inter-annual migration patterns [10,12]. Sedimentary and morphological connections exist between the evolution of subaerial coast and nearshore sandbars [13,14]. Because of such links and the complexity graphic Information System (GIS) and dealing with nearshore sandbars in multispectral satellite imagery has been suggested.
In this study, we present a fully automated GIS-based algorithm for the extraction of sandbar morphological characteristics in the imagery of PlanetScope and RapidEye sensors. To demonstrate the capabilities of the proposed methodology, a case study of sandy nearshore with a multiple sandbar system in the Curonian Spit, Baltic Sea is used.
The main contributions of the paper are: (1) a multi-step GIS workflow for multispectral satellite data processing dedicated to deriving nearshore morphology, including sandbars and their crestlines; (2) visual and quantitative assessment of satellite-derived sandbar data accuracy using in situ bathymetric dataset; (3) a discussion on strengths, limitations and applicability of the proposed algorithm and satellite-derived sandbar data with the addition of the promising performance of the proposed algorithm in application to Sentinel-2 MSI and Landsat-8 OLI imagery.

Study Area
The proposed algorithm has been tested in a sandy barrier-the Curonian Spitseparating Curonian Lagoon from the south-eastern Baltic Sea ( Figure 1). The Curonian Spit politically is divided between Lithuania (51 km) and Russia (47 km); the Lithuanian part, stretching in the northeast from Nida settlement to Klaipėda port jetty, has been considered in this study. The coast of the Curonian Spit is a non-tidal (tidal range < 0.05 m) wave-dominated environment with predominant lower than 2.0 m waves approaching from western directions (NW, SW, W). The annual mean wave height at the Lithuanian Baltic Sea coast is 0.5-1 m [64]. Wave climate has a seasonal character with the occurrence of higher waves in autumn and winter (0.76 and 0.85 m) and lower waves in spring and summer (0.56 and 0.62 m) [65]. During storms, wave height may reach 4-6 m. Wave energy flux in a year of median wave intensity is equal to 1.21 kWh/m on average and depends on seasonality, reaching its maximum in winter (2.38 kWh/m) and minimum in summer (0.68 kWh/m) [65]. The net annual longshore sediment supply is directed northward. Subaerial coast is defined by 30-80 m wide beaches, composed of fine to medium sand and bordered by up to 16 m high foredune [66].
The nearshore is characterized by a gentle slope (tanβ = 0.009-0.015, up to 8 m water depth) with a multiple sandbar system consisting of 2-5 bars. The increasing number of sandbars and decreasing sandbar volume describe the variability of nearshore morphology from the southern to the northern end of the Curonian Spit. The sandbar zone with 10-400 m wide sandbars stretch from 250 to 750 m offshore. Sandbar crests rise 0.15-4.9 m above the trough in up to 5.6 m water depth over them. The sandbar system exhibits various morphologies from longshore straight to crescentic and shore-attached. According to Wright and Short [67], the morphology of inner bars are from the transverse bar and rip (TBR) to rhythmic bar and beach (RBB) and longshore bar and trough (LBT) states; outer bar morphology usually corresponds to longshore bar and trough (LBT) or dissipative (D) states. Complex sandbar morphologies complicate automated sandbar crest extraction in remote sensing images but also make the study area a suitable polygon to design and examine such an algorithm.

Satellite Data
Multispectral imagery of PlanetScope and RapidEye sensors, provided by Planet Labs Inc. under the Education and Research program [68], were used in this study.
RapidEye satellite system is a constellation of five identical five-band multispectral sensors (Table 1), operated in 2009-2020. PlanetScope satellite system is a constellation, also known as the Dove satellite constellation, launched in 2017. It comprises multiple launches of groups of individual CubeSat satellites (total approx.130 satellites) with multispectral four-band sensors daily acquiring data of the entire Earth land surface. The wavelength of PlanetScope bands varies depending on satellite generation (Table 1). In this study, RapidEye Level 3A and PlanetScope Level 3B data products (Table 1), both radiometrically corrected and orthorectified with Ground Control Points (GCPs) and elevation model (DEM) to <10 m RMSE positional accuracy, were analysed. RapidEye Level 3A products are distributed as constant 25 × 25 km 2 grid tiles. PlanetScope satellites collect imagery as overlapping framed scenes of size equal to 25 × 11.5 km 2 or 25 × 23 km 2 , and scenes are not organized into a constant tiling grid system [69]. Both PlanetScope and RapidEye images were visually inspected, and only dates satisfying three criteria were selected. Criteria include cloud cover up to 20%, relatively clear water (sandbars are visible), no visible wave breaking over sandbars. Mean significant wave height on dates when selected images were acquired was 0-0.65 m (0.27 m on average), on dates used for algorithm validation between 0.07 and 0.4 m.

In Situ Data
Data of bathymetric surveys conducted with DualBeam Humminbird Helix 9 SI GPS echo-sounder, mounted on a shallow draft motor vessel, were used to validate sandbar crest position derived from satellite images. During surveys, dual beams of 200 kHz/ 20 • and 83 kHz/ 60 • were used. The echo-sounder blends returns from both frequency beams by starting with 83 kHz wide beam return (secondary source), dimming it, and then overlaying it with the 200 kHz narrow beam return (primary source). Echosounder has an integrated GPS/WAAS receiver, providing fast position fixes accurate within 2.5 m. Measurements were vertically corrected for water level fluctuation using data acquired with GNSS Topcon HiPer SR.
Bathymetric surveys are a result of cross-shore profiling along the Curonian Spit nearshore at 17 different locations with a spacing of 1-5 km (Figure 1). Surveys were performed in spring and autumn under low wave energy. Sandbar crests at six dates with 1-6 days difference between a bathymetric survey and image acquisition were compared with PlanetScope-derived crests and at four dates with 1-4 days difference with RapidEyederived crests (Table 2).

Data Pre-Processing
Multiple scenes of analysed sensors cover the study area (RapidEye-4 scenes; PlanetScope-variable number of scenes). Scenes were composed into mosaics covering all of the study area prior to further processing and analysis. PlanetScope multi-band mosaics were resampled to 5 m/pixel spatial resolution using bilinear interpolation to eliminate the difference between PlanetScope and RapidEye sensors. Enhanced Lee filter with the kernel of 3x3 pixels (Section 2.5) was applied to RapidEye mosaics prior to processing to reduce noise-induced distortions.

Spatial Filtering
The quality of PlanetScope and RapidEye images used in this study suffers from low signal-to-noise ratios compared to other optical sensors [70][71][72][73][74]. By distorting the original signal, noise complicates the process of sandbar extraction and causes sandbar fragmentation during the procedure. To solve this problem, spatial filtering techniquesadaptive median, enhanced Lee, Kuan and Gaussian filters-applied at different stages of the sandbar extraction procedure are presented.
In this study, a modified version of the adaptive median filter suggested by Li and Fan [75] was applied ( Figure 2). Filter reduces the variance of intensities in the image by replacing pixel value with a median value within the defined window surrounding the processing pixel. The window surrounding each pixel is variable, and it is determined whether the pixel is noisy in a current window prior to changing its value. bar extraction procedure are presented.
In this study, a modified version of the adaptive median filter suggested b Fan [75] was applied ( Figure 2). Filter reduces the variance of intensities in the i replacing pixel value with a median value within the defined window surroun processing pixel. The window surrounding each pixel is variable, and it is det whether the pixel is noisy in a current window prior to changing its value.  [75]. S min x,y , S med x,y and S max x,y denote, minimum, median and maximum values of the pixel in the filter window S w x,y cantered at (x, y) with a window of size w; w max -maximum filter window; I x,y -primary value of pixel; R x,y -value of filtered pixel; S med max x, y -median value within w max . Primary filter window w is set to 3 × 3 pixels and w max to 15 × 15. If it is determined that the pixel is not contaminated with noise within the 3 × 3 window, the primary pixel value is preserved. If the pixel is contaminated with noise, the filtering window is increased by 2 pixels. The procedure is repeated until the maximum window is reached.
The Enhanced Lee filter-introduced by [76] as an improvement of Lee filter [77] categorizes pixels into three classes: homogenous, heterogeneous and point target [76]. The distinction of classes relies on the image variation C i , noise variation C u and maximum noise variation C max coefficients. In image I x,y , the signal R x,y is expressed as in Equation (1): where W x,y is weighting function. The Kuan filter is an adaptive filter for speckle noise reduction introduced by Kuan et al. [78]. In the Kuan filter, a multiplicative model is transformed to a signaldependent additive noise model and the pixel value is smoothed using an estimate from the local mean, variance and standard deviation (Equation (2)): where W x,y is weighting function. Although the Enhanced Lee and Kuan filtering techniques are typically utilized to despeckle radar images, optical images used in this study portray a granular appearance different in nature but visually similar to multiplicative speckle radar noise, and local statistics filters effectively reduce such graininess and image fragmentation caused by it.
The Gaussian filter is a low-pass convolution filter, where an image I x,y is multiplicated by convolution matrix (kernel) K, which is a discrete approximation of the Gaussian function. In this study, a kernel of 5 × 5 pixels was used as in Equation (3).

Algorithm for Sandbar and Sandbar Crest Extraction
The proposed algorithm is divided into four stages of data processing and analysis. First, a shoreline is extracted, and a land-sea mask is created to discriminate the subaqueous domain with nearshore sandbars from the subaerial domain (the detailed procedure is discussed in Section 2.6.1). Second, multiple calculations are performed in the subaqueous domain to generate raster, representing nearshore bottom morphology, where sandbars and their crestlines might be identified easily (Section 2.6.2). Then, in a generated raster, boundaries of nearshore sandbars are defined, and sandbars are extracted (Section 2.6.3). Finally, sandbar crestlines are derived within previously defined boundaries (Section 2.6.4).
The algorithm was implemented in a GIS environment (ArcGIS Desktop 10.7). Maximum value pixels per transect was extracted via a script written in the R programming language. The script was made available as a tool in ArcGIS via an R-ArcGIS bridge.

Land-Sea Masking and Shoreline Extraction
The land-sea masking procedure is based on spectral differences between water and land in infrared bands where water absorbs most of the radiation. Many spectral indices for water retrieval have been introduced based on this reflective property [51,[79][80][81]. Most of them are combinations of the visible light spectrum and near-infrared (NIR) or short-wave infrared (SWIR) wavelengths. Because PlanetScope and RapidEye sensors contain a limited number of bands with only near-infrared outside visible light spectrum, Normalized Difference Water Index (NDWI) [79] (requiring only green and near-infrared reflectance) was employed in water and land separation procedure. It was calculated using Equations (4) and (5) for PlanetScope and RapidEye sensors, respectively.
where SR 2 and SR 4 correspond to the surface reflectance of the green and near-infrared bands of the PlanetScope sensor.
where SR 2 and SR 5 correspond to the surface reflectance of the green and near-infrared bands of the RapidEye sensor. NDWI was designed with a 0 threshold to distinguish water and land, but this value varies depending on sensor and image properties. Although several methods have been tested for binarization of NDWI images (0 thresholding, Otsu thresholding), The Iterative Selforganizing Data Analysis Techniques Algorithm (ISODATA) was chosen to derive landsea masks and delineate shoreline. NDWI and near-infrared band images were used as inputs for ISODATA unsupervised classification. Employing both NDWI and near-infrared band images gave more stable results in most instances compared to NDWI alone. The main steps of the land-sea masking and shoreline delineation procedure are shown in Figure 3.

Generation of Inputs for Sandbar and Sandbar Crest Extraction
In bands of the visible light spectrum, brighter pixels with larger reflectance values represent shallower underwater features. Therefore, surface reflectance values might be considered relatively representative of the bathymetric position. In geomorphology, a topographic position might be described by topographic indices, which compare the elevation of central pixel to elevations within the local neighbourhood, defined by window size [82]. These metrics are typically used for landform classification [83][84][85][86], but they deal with the same issue as this study-distinguishing positive landforms from negative or sandbars from troughs. The most applied metric of local topographic position is the Topographic Position Index (TPI), in marine geomorphology referred to as the Bathymetric Position Index (BPI) [87]. It is a signed unbounded absolute metric comparing the elevation of the central pixel with a mean elevation in a local neighbourhood. Similarly, the Relative Topographic Position Index (RTPI), which links central elevation with mean, minimum and maximum values within the local neighbourhood, was introduced. It is a signed metric accounting for elevation distribution, bounded by the interval (-1,1). As this paper deals with subaqueous features, it will be further referred to as the Relative Bathymetric Position Index (RBPI).
Both the BPI and the RBPI have been examined in this study. As surface reflectance decreases with increasing water depth and distance offshore, inner sandbars are represented by higher surface reflectance values than outer sandbars despite their height. Using an absolute metric as the BPI results in sinking outer sandbars because of a smaller difference between values in the local neighbourhood. Using a relative metric as the RBPI, which considers minimum and maximum values in the local neighbourhood, reduces distortions caused by water depth over sandbar crest and results in a better representation of nearshore morphology. Hence, the RBPI was chosen for further analysis. It was calculated separately for blue, green and red bands of PlanetScope and RapidEye imagery, using Equation (6) (based on Newman, Lindsay and Cockburn [82].

Generation of Inputs for Sandbar and Sandbar Crest Extraction
In bands of the visible light spectrum, brighter pixels with larger reflectance values represent shallower underwater features. Therefore, surface reflectance values might be considered relatively representative of the bathymetric position. In geomorphology, a topographic position might be described by topographic indices, which compare the elevation of central pixel to elevations within the local neighbourhood, defined by window size [82]. These metrics are typically used for landform classification [83][84][85][86], but they deal with the same issue as this study-distinguishing positive landforms from negative or sandbars from troughs. The most applied metric of local topographic position is the Topographic Position Index (TPI), in marine geomorphology referred to as the Bathymetric Position Index (BPI) [87]. It is a signed unbounded absolute metric comparing the elevation of the central pixel with a mean elevation in a local neighbourhood. Similarly, the Relative Topographic Position Index (RTPI), which links central elevation with mean, minimum and maximum values within the local neighbourhood, was introduced. It is a signed metric accounting for elevation distribution, bounded by the interval (-1,1). As this paper deals with subaqueous features, it will be further referred to as the Relative Bathymetric Position Index (RBPI).
Both the BPI and the RBPI have been examined in this study. As surface reflectance decreases with increasing water depth and distance offshore, inner sandbars are represented by higher surface reflectance values than outer sandbars despite their height. Using an absolute metric as the BPI results in sinking outer sandbars because of a smaller difference between values in the local neighbourhood. Using a relative metric as the RBPI, which considers minimum and maximum values in the local neighbourhood, reduces distortions caused by water depth over sandbar crest and results in a better representation of nearshore morphology. Hence, the RBPI was chosen for further analysis. It was calculated separately for blue, green and red bands of PlanetScope and RapidEye imagery, using Equation (6) (based on Newman, Lindsay and Cockburn [82]. (6) where SR denotes surface reflectance of the processing pixel and SR mean , SR min and SR max denote mean, minimum and maximum surface reflectance values in the local neighbourhood, respectively.
The RBPI depends on the size of the local neighbourhood. Choice of the window size determines the scale at which underwater landforms is distinguished: using small-sized window results in a detailed picture of smallest-scale underwater features and fragmented large-scale landforms ( Figure 4b); large-sized window results in distinguished large-scale underwater landforms with small-scale features merged into the whole (Figure 4e). In multiple nearshore sandbar systems, spacing and scale of submerged sandbars increase in the offshore direction [5,35,88]. Therefore, the optimal size of the local neighbourhood for inner and outer sandbars diverges. To save all the information about inner and outer sandbars multiscale approach for RBPI calculation is implemented. The routine of this approach is presented below and in Figure 5.    Procedure for the multiscale RBPI computation: 1. Nearshore zone is divided into fixed cross-shore sectors based on offshore distance ( Figure 4a). The width and number of the cross-shore sectors are defined by prevailing features of the sandbar system in the study area.

2.
RBPI values with 10 circle local neighbourhoods ( Figure 5) are calculated for visible light bands. The motive for the choice of a circle neighbourhood instead of the traditional square was a continuous and smooth nature of nearshore sandbar shape. 3.
The mean of RBPI values in local neighbourhoods of multiple sizes was calculated for each sector in each band of the visible light spectrum: from the mean of 3 smallest neighbourhoods for the sector closest to the shoreline to the mean of 3 largest neighbourhoods for the sector furthest offshore ( Figure 5). Other measures of descriptive statistics have been tested, and the maximum value was considered instead of the mean, but it resulted in random noise generation.

4.
Mean RBPI values in local neighbourhoods of multiple sizes for nearshore zone sectors in blue, green and red bands are summed using weighting coefficients. The selection of weighting coefficients was mainly governed by the penetrating capabilities of blue, green and red light and the quality of band images. In coastal waters, green light penetrates the water column the deepest [89], and the sandbar system is visible most sharply in its image. In contrast, longer red wavelengths are quickly absorbed by water, and only inner-middle sandbars are completely visible in their images, whereas the outer sandbar is often obscure. Blue wavelengths penetrate the water column deeper than red, but their images contain significant distortions caused by noise in both PlanetScope and RapidEye mosaics. Therefore, the largest coefficient of 0.6-0.8 was given to the green band; a coefficient of 0.1-0.3 was given to the red band; 0.1-to the blue band. The proportion of coefficients for green and red bands was differentiated based on nearshore cross-shore sectors: as distance offshore increases, the coefficient for green band increases. Final RBPI values for nearshore cross-shore sectors are calculated as in Equation (7): where µ Blue , µ Green and µ Red denote mean RBPI values in multiple sizes local neighbourhoods for blue, green and red bands of PlanetScope and RapidEye imagery, and D o f f denotes the distance from the shoreline. The result is saved as a multiscale RBPI Raster (Figure 6b). The multiscale RBPI is calculated only for the underwater part of an image. When there is no shore-attached sandbar, a step or a slight slope is a typical characteristic of foreshore. The upper slope of the foreshore is characterized by higher surface reflectance values than the lower one. When RBPI is calculated, it might be misclassified as a positive landform (sandbar). To solve this issue, the multiscale RBPI Raster is combined with a second-order derivative raster, which represents surface curvature (convexity and concavity). In the Curvature raster, the foreshore is a convex surface, and in combination with multiscale RBPI Raster, the Curvature raster submerges the misleadingly elevated upper slope of the beach face. The routine of Curvature generation and combination with the multiscale RBPI is described below and in Figure 5 The multiscale RBPI is calculated only for the underwater part of an image. When there is no shore-attached sandbar, a step or a slight slope is a typical characteristic of foreshore. The upper slope of the foreshore is characterized by higher surface reflectance values than the lower one. When RBPI is calculated, it might be misclassified as a positive landform (sandbar). To solve this issue, the multiscale RBPI Raster is combined with a second-order derivative raster, which represents surface curvature (convexity and concavity). In the Curvature raster, the foreshore is a convex surface, and in combination with multiscale RBPI Raster, the Curvature raster submerges the misleadingly elevated upper The multiscale RBPI and Curvature combination procedure: 1.
The mean surface reflectance value for blue, green and red bands is calculated.

2.
Mean surface reflectance raster of blue, green and red bands is used as an input for the second-order derivative (further curvature) calculation.

3.
Curvature raster is clipped to the submerged part only and filtered with an adaptive median filter (Section 2.5). It reduces random multiplicative noise in curvature images without oversmoothing of data. The result is saved as Curvature AMF Sea Raster (Figure 6c).

4.
Values of the Curvature AMF Sea and multiscale RBPI rasters are standardized and summed as in Equation (8): where RBPI stand and Curvature stand denote standardized values of the multiscale RBPI and Curvature AMF Sea rasters, respectively. Combined multiscale RBPI and Curvature rasters are saved as the RBPI-Curvature raster. Noise-induced segmentation and cross-shore differences in scale and distinctiveness of sandbars define the need to apply smoothing of different intensities to RBPI-Curvature raster in previously distinguished nearshore cross-shore sectors. To accomplish this, an Enhanced Lee filter (Section 2.5) with multiple window sizes (3 × 3; 5 × 5; 7 × 7; 11 × 11) is applied ( Figure 5). At first, random multiplicative noise is reduced in the RBPI-Curvature raster with an adaptive median filter (Section 2.5), then an Enhanced Lee filter with 3 × 3 window is applied to the RBPI-Curvature raster after adaptive median filtering; 5 × 5 Enhanced Lee filter is applied to raster after 3 × 3 filtering, 7 × 7 after 5 × 5 and 11 × 11 after 7 × 7 to obtain rasters with increasing level of smoothing. As the offshore distance increases, the output of filtered RBPI-Curvature raster with a greater degree of smoothing is assigned to cross-shore distance-based nearshore sectors and combined into a single output ( Figure 5). Finally, differences at edges of combined outputs are smoothed with Kuan filter (Section 2.5) with a 3 × 3 window. It was chosen because the Kuan filter does not categorize pixels as the Enhanced Lee filter (which better preserves edge sharpness) and gives the result with more naturally smoothed edges. The result after the filtering procedure is furthered referred to as Final RBPI-Curvature raster (Figure 6d).
To sink non-bar regions and to expose sandbars Final RBPI-Curvature raster is rescaled to scale from 1 to 1000 with MSLarge transformation function (Figure 7). MSLarge function brings out large values based on the mean and standard deviation of data. After transformation, deeper non-sandbar nearshore regions remain only as background with the same value, and higher regions of the nearshore bottom with sandbars preserve all range of values (non − sandbar region = 1; 1 < sandbar region ≤ 1000). Rescaled RBPI-Curvature raster values are converted to an integer, and a Majority filter with an 8-pixel neighbourhood is applied to remove the remaining small regions with a few isolated pixels to get a cleaner result. In this instance, if Rescaled RBPI-Curvature raster has remaining isolated pixels, they are replaced with background value because the majority filter replaces pixel value with mode if 5 out of 8 contiguous pixels have the same value. Rescaled RBPI-Curvature raster (Figure 6e) is the final output for the extraction of nearshore sandbars.

Extraction of Nearshore Sandbars
A rescaled RBPI-Curvature raster is used as an input for nearshore sandbar extraction. It is classified into two classes-sandbar and non-sandbar regions-with ISODATA unsupervised clustering. Classified raster is filtered with majority filter twice to remove remaining isolated pixels and to get a cleaner boundary of sandbars, and then the class with non-sandbar regions is set to no-data, and an integer raster with sandbars only is generated. It has remaining misclassified areas mostly outside the sandbar zone where surface reflectance values in the primary image were uneven due to noise signal, thin clouds, haze and heterogeneity of water surface. To remove misclassified regions, the sandbar raster is converted to a vector polygon layer, which is cleaned using selection operations with defined criteria based on the typical distance from the shoreline D o f f and size of sandbars A in the study area. The details of the criteria are described below and in Figure 7. the shoreline at least at one of its segments in the Curonian Spit) 2.
If a polygon satisfies at least one criterion, it is deleted as a non-sandbar. All remaining polygons are considered as sandbars and are saved as Bar Mask (Figure 6f). The rescaled RBPI-Curvature raster is clipped with Bar Mask and saved as Primary Bar Raster. To smooth the Primary Bar Raster and to ensure the continuity of sandbar crests after the extraction Gaussian filter with a 5 × 5 kernel (Section 2.5) is applied. The result is saved as Final Bar Raster (Figure 6g). Additionally, the Slope was calculated for the Final Bar Raster, then inverted and saved as Bar-Slope Raster. The Slope is calculated as the maximum change in value over the distance between a pixel and its eight neighbours It was not employed in further process, but it provides an output of extracted sandbars with clearly visible crestline (Figure 6h).

Extraction of Nearshore Sandbar Crests
Complex sandbar morphologies (crescentic shapes, rhythmic patterns, etc.) determines that sandbar crestlines might exhibit variable shapes and orientation relative to the shoreline: parallel, oblique or transverse. The typical approach to detect longshore sandbar crest locations with shoreline-perpendicular transects (e.g., [62]) might not identify all the variability of sandbar crestline shapes leading to undetected or incorrectly delineated crests that are not parallel to the shoreline. For better detection of sinuous crestlines, they are located in three directions: perpendicular to the shoreline and oblique to the shoreline (at 45°-225° and 135°-315° angles). Because the main shoreline direction in the study area is orientated from south to north, these directions correspond to West-East (W-E), North East-South West (NE-SW) and North West-South East (NW-SE) orientations. The criteria to eliminate non-sandbar regions misclassified as sandbars: 1.
D o f f > 500 m (typically, the inner boundary of outer sandbars is within 500 m from the shoreline at least at one of its segments in the Curonian Spit) 2.
200 m < D o f f < 350 m and A < 7500 m 2 . If a polygon satisfies at least one criterion, it is deleted as a non-sandbar. All remaining polygons are considered as sandbars and are saved as Bar Mask (Figure 6f). The rescaled RBPI-Curvature raster is clipped with Bar Mask and saved as Primary Bar Raster.
To smooth the Primary Bar Raster and to ensure the continuity of sandbar crests after the extraction Gaussian filter with a 5 × 5 kernel (Section 2.5) is applied. The result is saved as Final Bar Raster (Figure 6g). Additionally, the Slope was calculated for the Final Bar Raster, then inverted and saved as Bar-Slope Raster. The Slope is calculated as the maximum change in value over the distance between a pixel and its eight neighbours It was not employed in further process, but it provides an output of extracted sandbars with clearly visible crestline (Figure 6h).

Extraction of Nearshore Sandbar Crests
Complex sandbar morphologies (crescentic shapes, rhythmic patterns, etc.) determines that sandbar crestlines might exhibit variable shapes and orientation relative to the shoreline: parallel, oblique or transverse. The typical approach to detect longshore sandbar crest locations with shoreline-perpendicular transects (e.g., [62]) might not identify all the variability of sandbar crestline shapes leading to undetected or incorrectly delineated crests that are not parallel to the shoreline. For better detection of sinuous crestlines, they are located in three directions: perpendicular to the shoreline and oblique to the shoreline (at 45 • -225 • and 135 • -315 • angles). Because the main shoreline direction in the study area is orientated from south to north, these directions correspond to West-East (W-E), North East-South West (NE-SW) and North West-South East (NW-SE) orientations.
In the crestline delineation procedure, maximum value pixels within local neighbourhoods defined by the rowing window in the Final Bar raster are considered as crests. Three local neighbourhoods, which represent perpendicular and oblique directions, are utilized ( Figure 8):

1.
A local neighbourhood with 5 pixels (25 m) orientated in the W-E direction; 2.
An irregular local neighbourhood with 7 pixels (35 m) in the NE-SW direction ( Figure 8. A flowchart of the sandbar crest extraction procedure: at first, the primary crest as maximum value pixels within three kernels are identified, then secondary crest with cross-shore/longshore transects is extracted, and the final bar crest is obtained after cleaning procedure with proximitybased filter. If it is indicated that pixel value is equal to maximum within W-E, NE-SW, or NW-SE neighbourhood, it is considered as crest candidate. Identified maximum pixel values within all three neighbourhoods are summed. Here, if the same pixel has maximum value within multiple neighbourhoods, it will be attributed with a higher value than pixels with maximum value within one neighbourhood. Raster with summed maximum pixel values within W-E, NE-SW and NW-SE directed neighbourhoods is considered the Primary Crest Raster (Figure 6i).
If maximum value pixels do not match within all local neighbourhoods, a crest wider than one pixel is generated in the Primary Crest Raster. To narrow crestlines to one pixelwide maximum value pixels, secondary crests within crests candidate pixels in the Primary Crest Raster are determined using cross-shore (CST) and longshore (LST) transects. The procedure of secondary crest extraction is described below and in Figure 8.
The procedure for secondary crest extraction: 1. Primary Crest Raster is binarized and converted to polygon layer (Primary Crest Polygon).

2.
Cross-shore (CST) and longshore (LST) transects with spacing equal to satellite image resolution (5 m) are created and intersected with Primary Crest Polygon.

3.
Intersecting CST and LST within primary crest polygons are joined based on their spatial relationship.

4.
Lengths (d) of pairs of intersecting CST (d CST ) and LST (d LST ) are compared: if d CST > d LST , it is considered that the main sandbar crest direction is orientated parallel to the shoreline, and CST is selected; if d CST < d LST , the main sandbar crest direction is orientated perpendicular to the shoreline, and LST is selected; if d CST = d LST , CST is selected. Selected CST and LST are merged into one layer. CST and LST lengths are equal when crests in Primary Crest Raster are one-pixel wide (in most instances), and CST/LST selection makes no difference because, in any case, the same pixel will be the maximum value pixel.

5.
Maximum value pixels within selected CST and LST transects are identified as secondary crest pixels and exported to Secondary Crest Raster (Figure 6j).
The Secondary Crest Raster has remaining non-crest pixels misclassified as crests (usually sandbar boundary pixels or other redundant pixels/pixel regions). To distinguish them from actual crests, a crest cleaning algorithm is implemented. It is based on the understanding that the sandbar extends at least tens of meters, and one or a few isolated pixels cannot represent the sandbar crestline. It means that the crest pixel must have a certain number of neighbours also identified as crests. Local neighbourhoods of increasing size with the defined requirement for the number of neighbours to be crest pixels were used as a part of the crest cleaning algorithm. The details of the routine are described below and in Figure 8.
The routine for crest cleaning: 1.
Square kernels with excluded centre (processing) pixels are used to quantify the number of neighbourhood pixels. Minimal kernel size is 3 × 3 pixels (15 × 15 m), and the maximum is 21 × 21 (105 × 105 m). Every kernel is expanded by 2 pixels until the maximum is reached. Crest values in the secondary crest raster are set to 1, so that sum of values in the kernel would be equal to the number of crest neighbours ( Figure 8).

2.
It is determined that in a neighbourhood of 3 × 3 pixels, processing crest pixel must have at least 2 crest neighbours (sum > 1). It means that within 8 neighbour pixels, at least 2 must be sandbar crests. When the kernel is expanded by 2 pixels, the requirement of the sum in the neighbourhood is also increased by 2 (Figure 8). The process is repeated until the maximum kernel is reached.

3.
A pixel is identified as crest only if the requirement of the sum is fulfilled in all kernels, and it was previously identified as a crest pixel (value in secondary crest raster was equal to 1).

4.
A defined filter sometimes is too aggressive and removes actual crest pixels, especially those at the beginning and at the end of the crestline or when the crest is sinuous. Thus, part of filtered pixels is restored with three kernels: 5 × 2 pixels square; 5 pixels NE-SW and NW-SE directed (Figure 8). If the sum within at least one of three kernels is greater than 2, the pixel is restored as a crest pixel. If the pixel does not meet the criteria in all kernels, it is removed as a non-crest pixel.

5.
After filtering, small regions with aggregated pixels remain misclassified as crests.
They are removed based on the number of pixels aggregated into one continuous region (R). Defined criteria are split based on distance from shoreline (D o f f ): if D o f f < 350 m, R < 6 pixels are removed; if D o f f > 350 m, R < 10 pixels are removed. Distance criterion is set because near the shoreline sandbar morphologies of smallerscale form, while outer sandbar exhibits much greater extents, so aggregated regions must be larger to be considered as crests. 6.
After the removal of small regions, Final Crest Raster (Figure 6k) is created. 7.
The Final Crest Raster is converted to a polyline layer. Polylines are smoothed with 20 m smoothing tolerance and exported as Final Crest Polyline (Figure 6l).

Visual Assessment of Extracted Sandbars
The proposed method has been tested with 42 RapidEye and 103 PlanetScope images acquired in 2009-2020. Extracted sandbars and their crests were visually inspected to assess the quality of results and possible shortcomings of the designed algorithm. Figure 9 shows an example of a time series with derived boundaries and crests of nearshore sandbars. Typical inter-annual characteristics of cyclic behaviour and seasonal patterns of morphological development in multiple sandbar systems are apparent here.
Remote Sens. 2021, 13, x FOR PEER REVIEW 19 of 31 Figure 8. A flowchart of the sandbar crest extraction procedure: at first, the primary crest as maximum value pixels within three kernels are identified, then secondary crest with cross-shore/longshore transects is extracted, and the final bar crest is obtained after cleaning procedure with proximity-based filter.

Visual Assessment of Extracted Sandbars
The proposed method has been tested with 42 RapidEye and 103 PlanetScope images acquired in 2009-2020. Extracted sandbars and their crests were visually inspected to assess the quality of results and possible shortcomings of the designed algorithm. Figure 9 shows an example of a time series with derived boundaries and crests of nearshore sandbars. Typical inter-annual characteristics of cyclic behaviour and seasonal patterns of morphological development in multiple sandbar systems are apparent here. Although the algorithm was designed for images with clear water and calm sea, the visual assessment showed that sea surface roughness caused by small waves has no significant impact on the result of satellite-derived sandbar crests. Visual observations revealed that capabilities to detect less distinctive sandbars in greater depths decrease if the transparency of the water column or atmosphere is decreased by turbulency of sediment, haze, thin clouds, or other phenomena. Although the algorithm was designed for images with clear water and calm sea, the visual assessment showed that sea surface roughness caused by small waves has no significant impact on the result of satellite-derived sandbar crests. Visual observations revealed that capabilities to detect less distinctive sandbars in greater depths decrease if the transparency of the water column or atmosphere is decreased by turbulency of sediment, haze, thin clouds, or other phenomena.

Accuracy of Extracted Crestline Position
Six pairs of PlanetScope images and bathymetric surveys with 332 pairs of crest positions were compared to validate the proposed method (Figure 10a-c). PlanetScope-derived sandbar crest locations are in good agreement with in situ data: the total coefficient of determination (R 2 ) between measured and PlanetScope-derived sandbar crest distance from the shoreline was 0.999, ranging from 0.998 to 0.999 for individual dates. The root-meansquare error (RMSE) for all dates was 5.8 m, ranging from 4 to 9.7 m for individual dates (Figure 10b). For four out of six dates, RMSE was between 4 and 4.8 m, and only two dates showed errors larger than 5 m. The largest RMSE was for the image acquired on 26 June 2020, which had the largest time span between in situ and satellite data. Therefore, lower accuracy might be caused by changes in the sandbar system but not the algorithm itself.

Accuracy of Extracted Crestline Position
Six pairs of PlanetScope images and bathymetric surveys with 332 pairs of crest positions were compared to validate the proposed method (Figure 10a-c). PlanetScope-derived sandbar crest locations are in good agreement with in situ data: the total coefficient of determination (R 2 ) between measured and PlanetScope-derived sandbar crest distance from the shoreline was 0.999, ranging from 0.998 to 0.999 for individual dates. The rootmean-square error (RMSE) for all dates was 5.8 m, ranging from 4 to 9.7 m for individual dates (Figure 10b). For four out of six dates, RMSE was between 4 and 4.8 m, and only two dates showed errors larger than 5 m. The largest RMSE was for the image acquired on 26 June 2020, which had the largest time span between in situ and satellite data. Therefore, lower accuracy might be caused by changes in the sandbar system but not the algorithm itself.   1 (a,d) shows correlation for inner, middle and outer sandbars; column 2 (b,e) shows correlation for dates of image acquisition, column 3 (c,f) shows total correlation and root-mean-square-error for analysed sensors.
Four pairs of RapidEye images and available bathymetric surveys with 231 pairs of crest positions were compared to validate the proposed procedure for this sensor (Figure 10d-f). RapidEye-derived sandbar crest locations are in good agreement with in situ data with the total coefficient of determination (R 2 ) of 0.997, ranging from 0.995 to 0.999 for individual dates. The root-mean-square error (RMSE) for all dates was 7.01 m (Figure 10f). RMSE for two dates was between 4.5 and 5.7 m, and for the other two, between 11.1 and 12 m (Figure 10e), showing large inconsistencies among accuracy of individual dates. Visual comparison of the PlanetScope image acquired on the same day as the bathymetric survey and the RapidEye image acquired on 20 May 2018, with a 4-day time span from in situ measurements revealed that the shape of sandbars has evolved during this period. Visual inspection of the PlanetScope image obtained on 11 October 2018 (RMSE = 4.5 m), RapidEye image obtained on October 15 (RMSE = 12 m), and crest points from a bathymetric survey performed on 15 October has shown that the RapidEye image was shifted landward from measured crest points and the PlanetScope image. These observations suggest that deviations of errors are rather caused by morphodynamics of sandbars and errors in image positional accuracy.
The RMSE for inner, middle and outer sandbars in PlanetScope images was 3.8, 4.6 and 7.4, respectively (Figure 10a). The tendency of accuracy to increase as sandbar distance from shoreline decreases in RapidEye images remained similar as for PlanetScope sensor with RMSE of 6.5, 6.6 and 7.7 for inner, middle and outer sandbars, respectively (Figure 10d). The largest RMSE value for outer sandbar is because of the larger depth over their crests and the flat, wide shape of the crest itself, especially with the cases when outer sandbars are decaying.
The mean bias of sandbar distance offshore for PlanetScope and RapidEye sensors was 3.95 m and −2.71 m, respectively, meaning that sandbar distance from the shoreline in PlanetScope images was bias seaward and bias landward in RapidEye images. This tendency was evident for all individual dates. It suggests that data extracted from PlanetScope and RapidEye sensors in combination should be analysed with caution.

Accuracy of Extracted Shoreline Position
129 measured shoreline points were compared to PlanetScope-derived and 80 points to RapidEye-derived shoreline position to evaluate the accuracy of the proposed procedure for the shoreline extraction. The root-mean-square error (RMSE) for PlanetScope was 4.5 m, ranging from 0.2 to 7.7 m for individual dates. For RapidEye, the average RMSE was 4.4 m, ranging from 0.8 to 6.5 m for individual dates. In images of both sensors, the shoreline was placed seaward from the measured position with a mean bias of 3.9 m and 3.4 m for PlanetScope and RapidEye, respectively. Seaward-directed displacement of satellitederived shoreline position is often observed in optical remote sensing [53,[90][91][92][93]. Here, the narrow range of the electromagnetic spectrum sampled by PlanetScope and RapidEye constellations with only near-infrared wavelengths outside the visible light region is one of the factors determining the accuracy of obtained shorelines. Inherit property of nearinfrared wavelengths to sense concentrations of sediments and other constituents of water diminish the capability to discriminate water from land and contributes to the seaward displacement of satellite-derived shorelines.

Strengths and Limitations
As research of nearshore sandbars is often limited by the data availability [61], the present study intends to develop an algorithm suitable to gather this data from satellite imagery using GIS techniques. The study suggests a new approach based on the Relative Bathymetric Position Index (RBPI) and a combination of data processing and filtering operations designed specifically for the purpose. The Bathymetric Position Index has been widely used with bathymetric datasets for various coastal and marine applications [94][95][96][97][98][99][100][101][102][103], including sandbar extraction in the bathymetric LiDAR dataset [26], but the idea of using this metric in remote sensing images without derived bathymetry to our knowledge has never been explored before. This article illustrates that with a newly designed methodology, RBPI is suitable to discriminate nearshore morphology in non-bathymetric remote sensing images. It is mainly possible because, similar to bathymetry digital elevation models, brighter and darker pixels in visible light spectrum bands of satellite imagery represent shallower and deeper nearshore areas.
The application of the proposed method in the Curonian Spit, the Baltic Sea demonstrates that, in combination with medium resolution satellite imagery, it can be used to study multiple nearshore sandbar systems. It is justified by the method design for a range of sandbar morphologies (straight and crescentic; longshore parallel and oblique), which cover most of the commonly observed nearshore sandbar types [5,11]. Therefore, if adjustments to site-specific parameters related to sandbar size and shoreline configuration are made, the proposed technique can be used to study these underwater features in other sandy environments.
Currently, only a few studies that analyse satellite-derived data with a focus on sandbar crest position exist [61,62]. Compared to other automated techniques, the major advantage of the proposed algorithm is that besides higher accuracy of crest locations, it provides outputs with an entire set of other information, including sandbar boundaries (Table 3). This enables the possibility to quantify width, length, area and the overall shape of sandbars in addition to the distance from the shoreline and the number of sandbars. The remaining missing sandbar characteristics are sand volume and water depth; therefore, possible extension of methodology could include derivation of nearshore bathymetry for evaluation of these parameters. With a set of in situ depth points, bathymetry could be derived using previously proposed techniques (e.g., [58,104,105]). Although the algorithm was implemented in the ArcGIS environment and many coastal researchers, managers and other stakeholders are familiar with it [106], the proposed technique uses general operations and functions which can be executed in other open-source GIS environments, including QGIS, GRASS GIS, SAGA GIS or using the R programming language.
Some aspects of the capabilities and limitations of the algorithm can be defined through its performance in the recognition and omission of sandbars compared to the ones identified in nearshore cross-shore profiles ( Figure 11). Such assessment, based on images and in situ data, acquired under low wave energy (significant wave height 0-0.4 m) in a non-tidal coastal environment, exposes both shortcomings and superiorities of the satellite data over bathymetric surveys. One superiority emerges in very shallow waters where the algorithm enhances the detectability of inner sandbars when bathymetric measurements fail to locate them because of complicated navigation and echo-sounding errors in very shallow areas (<1 m) [107]. The algorithm demonstrates fine performance in sensing nearshore sandbars at least up to 6 m depth over their crest (Figure 11), including decaying outer sandbars with flat-topped crests. It is expected that the capability of the algorithm to locate outer sandbars will diminish if more than one of the following constraints transpire: (1) water depth over sandbar crest is >6 m; (2) outer sandbar is decaying; (3) environmental factors limiting water transparency are evident. Limiting environmental factors include atmospheric conditions (clouds, haze), hydrodynamic conditions (breaking waves, rough sea surface) and water turbidity. Such conditions are more frequent in winter and autumn what determines lower temporal frequency and quality of data in those seasons. Limiting environmental factors act in two ways: decrease the accuracy of derived data and narrow down the range of water depth over sandbar crest when sandbars can be detected. The technique can still be applied if images do not contain breaking waves, wave foam and a high concentration of suspended material. Another limitation might be related to geopositional accuracy (< 10 m) of imagery used in this study, which might be the cause of inaccuracies in sandbar position. Similar constraints were observed by previous studies, using other optical sensors: Tătui and Constantin [62] and Athanasiou et al. [61] observed omission of sandbars in Sentinel-2 and Landsat images caused by limited water column transparency and overlook of outer sandbars situated in the depth of 3 m in Sentinel-2 data [62]. However, the present study suggests that when none of the environmental constraints is present, the number of satellite-detected sandbars exceeds algorithm-related errors ( Figure 11). It means that in some instances, satellite-derived data portray a better representation of nearshore bottom morphology.  [62]. However, the present study suggests th when none of the environmental constraints is present, the number of satellite-detect sandbars exceeds algorithm-related errors ( Figure 11). It means that in some instanc satellite-derived data portray a better representation of nearshore bottom morphology Figure 11. The ability of the algorithm to detect sandbars in PlanetScope and RapidEye images compared to measured data: undetected-sandbars visible in bathymetric cross-shore profile and undetected by the algorithm; detected-sandbars visible in bathymetric cross-shore profile and detected by the algorithm; falsely detected-non-existing sandbars, extracted by the algorithm; satellite detected-sandbars not-visible in cross-shore profiles, but identified by the algorithm.
Compared to the preferred optical remote sensing method to study sandbar beha iour video monitoring, the proposed technique provides data of lower temporal f quency and is not capable of working in full capacity under high wave energy (Secti 2.5) as it was primarily designed for low wave energy conditions. However, in contrast video monitoring, it extends possibilities of sandbar studies from local to regional larger scale and in areas where sandbar data are not available.

Applicability to Sandbar Monitoring
To be able to use the proposed technique to monitor the behaviour of nearshore san bars, the rate of sandbar dynamics must exceed possible errors. Previous studies ha Figure 11. The ability of the algorithm to detect sandbars in PlanetScope and RapidEye images compared to measured data: undetected-sandbars visible in bathymetric cross-shore profile and undetected by the algorithm; detected-sandbars visible in bathymetric cross-shore profile and detected by the algorithm; falsely detected-non-existing sandbars, extracted by the algorithm; satellite detected-sandbars not-visible in cross-shore profiles, but identified by the algorithm.
Compared to the preferred optical remote sensing method to study sandbar behaviour video monitoring, the proposed technique provides data of lower temporal frequency and is not capable of working in full capacity under high wave energy (Section 2.5) as it was primarily designed for low wave energy conditions. However, in contrast to video monitoring, it extends possibilities of sandbar studies from local to regional or larger scale and in areas where sandbar data are not available.

Applicability to Sandbar Monitoring
To be able to use the proposed technique to monitor the behaviour of nearshore sandbars, the rate of sandbar dynamics must exceed possible errors. Previous studies have reported sandbar migration rates of 30-200 m/year [16,[108][109][110][111], which implies the suitability of Planet's imagery with an accuracy of the proposed technique (RMSE of 5.8-7 m) for monitoring of seasonal and inter-annual sandbar migration. With observed migration rates of 20-50 m/day during storms [38,110,112,113] and the current precision of the designed technique, it may be a low-cost solution to monitor short-term changes related to high-impact events. However, monitoring of moderate short-term changes is more complicated because of the possibility of misperceiving inaccuracies as an episodic sandbar migration or morphological evolution.
If placed into an automated workflow of analysis, the algorithm-derived satellite data could contribute to new insights into sandbar behaviour at multiple time scales and larger spatial extents or areas where sandbar data is unavailable. With conventional methods for acquiring sandbar data being time-consuming, expensive, or spatially limited [15,26], this study proves the feasibility of automatically derived satellite data as a valuable source of repetitive sandbar observations, which could provide necessary information for coastal research and management.

Applicability to Other Optical Sensors
The present study demonstrates the capability of the proposed method to derive sandbars and their crestlines in satellite images of 3-5 m spatial resolution. With slight modifications, this technique can be employed with other optical satellite sensors. To examine the potential of the method, it was tested with publicly available imagery of other medium-resolution satellites (Sentinel-2 MSI; Landsat-8 OLI). For Landsat-8, a panchromatic band (15 m) was used instead of multispectral bands (30 m). Images were upsampled, and the degree of spatial filtering was reduced. In Figure 12, it is illustrated that a modified version of the proposed method was capable of detecting sandbar crests precisely in Sentinel-2 and Landsat-8 images during low wave energy conditions. After comparison of 169 in situ crest points against crests derived from Sentinel-2 MSI (Figure 12c) and Landsat-8 OLI (Figure 12d) imagery, RMSE of nearly half a pixel has been found for both Sentinel-2 (4.5 m) and Landsat-8 (7.6 m) sensors. The results of Sentinel-2 and Landsat-8 validation suggest that using the proposed method sandbar crests in free satellite imagery of lower spatial resolution (10-15 m) may be detected with similar accuracy to higher spatial resolution imagery (3-5 m) of the commercial satellites used in this study.
The potential application of the proposed method has been also tested with Sentinel-2 MSI and Landsat-8 OLI imagery during medium-high wave energy conditions ( Figure 13). After comparison of in situ crest positions with satellite-derived crest locations, RMSE of 18.9 m and 22.9 m has been found for Sentinel-2 MSI and Landsat-8 OLI, accordingly (Figure 13c,d). Although greater error might be partly caused due to a larger time-span between the acquisition of images and measurements, it shows that the accuracy of the proposed method drops significantly when medium and high energy breaking waves are present. It also should be noted that the proposed technique is capable of detecting sandbars if breaking waves are present over the sandbar crest or if the sandbar is visible through the water column. It was observed that during high wave energy conditions, the algorithm worked better in the northern part of the study area where the outer sandbar is found in 3-4 m water depth than in the southern part with an outer sandbar in 5-6 m depth. The potential application of the proposed method has been also tested with Sentinel-2 MSI and Landsat-8 OLI imagery during medium-high wave energy conditions ( Figure  13). After comparison of in situ crest positions with satellite-derived crest locations, RMSE of 18.9 m and 22.9 m has been found for Sentinel-2 MSI and Landsat-8 OLI, accordingly (Figure 13c,d). Although greater error might be partly caused due to a larger time-span between the acquisition of images and measurements, it shows that the accuracy of the proposed method drops significantly when medium and high energy breaking waves are present. It also should be noted that the proposed technique is capable of detecting sandbars if breaking waves are present over the sandbar crest or if the sandbar is visible through the water column. It was observed that during high wave energy conditions, the algorithm worked better in the northern part of the study area where the outer sandbar is found in 3-4 m water depth than in the southern part with an outer sandbar in 5-6 m depth. Future research could also focus on method application to aerial photography. If it contains spectral band in the infrared region which is required to extract underwater image part with sandbars or if different land-sea segmentation procedure based on panchromatic/visible light data is chosen (e.g., [114,115]), sandbars could be extracted from the data of both panchromatic and colour historical aerial photography, but additional research is required to evaluate the accuracy of such application.
Remote Sens. 2021, 13, x FOR PEER REVIEW Figure 13. An example of sandbar crestlines delineated using the proposed method in Senti MSI (a) and Landsat-8 OLI (b) images with a correlation of measured and extracted crest di from the shoreline (c,d) during high wave energy conditions. Future research could also focus on method application to aerial photograph contains spectral band in the infrared region which is required to extract underwa age part with sandbars or if different land-sea segmentation procedure based on pa matic/visible light data is chosen (e.g., [114,115]), sandbars could be extracted fr data of both panchromatic and colour historical aerial photography, but additio search is required to evaluate the accuracy of such application.

Conclusions
In this study, a novel methodological approach for the discrimination of nea sandbars in optical satellite imagery is designed. The proposed technique is a step-b workflow implementable in most GIS environments. In every step, an output pro new information about nearshore morphology is generated. After the implementa the entire procedure, outputs with nearshore morphology, extracted sandbars, deli sandbar crests and shorelines are acquired, providing a series of data required to sandbar dynamics.
The capabilities of the new technique were demonstrated using a case study Curonian Spit, Baltic Sea. The accuracy of the method was assessed by comparin locations derived from PlanetScope and RapidEye images to in situ data of 6 bathy surveys. A strong agreement (R 2 = 0.999 and 0.997) between measured and derived bar crests was observed with an average RMSE of 5.8 and 7 m for PlanetScop Figure 13. An example of sandbar crestlines delineated using the proposed method in Sentinel-2 MSI (a) and Landsat-8 OLI (b) images with a correlation of measured and extracted crest distance from the shoreline (c,d) during high wave energy conditions.

Conclusions
In this study, a novel methodological approach for the discrimination of nearshore sandbars in optical satellite imagery is designed. The proposed technique is a step-by-step workflow implementable in most GIS environments. In every step, an output providing new information about nearshore morphology is generated. After the implementation of the entire procedure, outputs with nearshore morphology, extracted sandbars, delineated sandbar crests and shorelines are acquired, providing a series of data required to study sandbar dynamics.
The capabilities of the new technique were demonstrated using a case study of the Curonian Spit, Baltic Sea. The accuracy of the method was assessed by comparing crest locations derived from PlanetScope and RapidEye images to in situ data of 6 bathymetric surveys. A strong agreement (R 2 = 0.999 and 0.997) between measured and derived sandbar crests was observed with an average RMSE of 5.8 and 7 m for PlanetScope and RapidEye sensors, accordingly.
The results suggest Planet's imagery as a source for monitoring nearshore sandbar behaviour in seasonal and inter-annual time scales. The versatility of the algorithm determines the high potential of its feasibility to other optical sensors, including Sentinel-2 MSI and Landsat-8 OLI, where sandbar crests were identified with an accuracy of half a pixel, and many sandy environments worldwide if proper modifications are made. Further research could fully validate the capabilities of the newly proposed algorithm to obtain sandbar morphology in other sandy nearshore regions and imagery of other satellite sensors.
The increasing availability of Earth observation imagery offers a free/low-cost alternative to traditional techniques for monitoring nearshore sandbars. This study demonstrates that in combination with an automated technique for data extraction, satellite images turn into a valid tool to observe sandbar morphology and dynamics. However, the utilization of satellite images is decided by the sensor quality (spatial and spectral resolution, signal-to-noise ratio), environmental conditions (water transparency, cloud cover, wave energy) and characteristics of the sandbar system itself (scales, depth, height of sandbars and distinctiveness of their crests). This study shows that satellite-derived sandbar data are most accurate during low wave energy conditions, and high wave energy results in significantly less accurate data. Future studies should seek to overcome constraints reducing the feasibility of satellite images to obtain sandbar morphology and to examine their full capacities to make new insights into sandbar behaviour.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to due to the Data Use Agreement with Planet Labs.

Conflicts of Interest:
The authors declare no conflict of interest.