Shoreline Extraction Methods from Sentinel-2 and PlanetScope Images

This work aims to compare and assess the performance of certain methodologies for shoreline mapping based on the use of medium (10 m) and high resolution (3 m) multi-spectral imagery, provided by Sentinel-2 (S2) and PlanetScope (PS), respectively. Being Sentinel-2 part of the Copernicus missions, its data are freely available. PS imagery are also freely available for scientific research, upon approval by the European Space Agency of a related project proposal. Several spectral indices, including Normalized Difference Water Index (NDWI), Modified Normalized Difference Water Index (MNDWI), Automated Water Extraction Index (AWEI), and Water Index (WI), were used for shoreline detection. In particular, two unsupervised classification techniques, the Gaussian Mixture Model (GMM) and K-means clustering were deployed as shoreline extraction methods. The outcomes of such approaches were validated using reference shorelines derived from aerial orthomosaics, generated from images acquired as close as possible to the satellite imagery dates, and the ”baseline and transect” approach for accuracy verification. Three tide-less Mediterranean beaches were used as study cases for comparison: the beach between Castelldefels and Gava in Spain, Feniglia and Marina di Grosseto in Italy. The results demonstrated sub-pixel accuracy in shoreline extraction, with Mean Absolute Distances ranging from 2 m to 5 m for S2 data and 1.5 m to 2 m for PS data. These findings highlight the potential of freely available satellite data for semi-automatic shoreline detection. Results obtained by using the combination of different indices and methodologies show that the best option may change depending on the considered context, hence future investigations should be dedicated to the development of a procedure for automatically determining the context-based (close to) optimal index-classifier combination.


Introduction
The complexity of coastal zones is clearly illustrated by their dual role: they support intense human activity and economic interests on one hand, and on the other, they are crucial for biodiversity and provide invaluable habitats.Low-lying sandy coasts face anthropogenic pressures both directly, through infrastructure development and beach nourishment that alter natural coastal dynamics, and indirectly, via climate change effects, sea-level rise, and the increase in extreme weather events.These pressures accelerate land loss in many delta areas.
Historically, the shoreline position, essentially defined as the interface or physical boundary between land and water (Boak and Turner, 2005), has been the primary indicator used for coastal environment monitoring and management.According to (Spinosa et al., 2021), traditionally, data collection in coastal areas is usually conducted manually by a human operator, a planned Unmanned Aerial Vehicle (UAV) campaign, or aerial flight.This method is time-consuming, expensive, and constrained by the operator's limitations and choices (Vitousek et al., 2023).
In contrast, remote sensing has emerged as an essential tool for coastal monitoring, providing benefits such as extensive area coverage, and consistent and regular data collection.Hence, the availability of medium-resolution satellite images for free, like those provided by the European Space Agency's Copernicus program Sentinel-2 (S2) and NASA/USGS Landsat mission, has revolutionized Satellite-Derived Shoreline (SDS) monitoring.Then, the introduction of satellite products with improved spatial resolution, like the 3 m spatial resolution images freely provided by PlanetScope (PS) for research purposes, can be exploited to further increase the shoreline monitoring accuracy Li et al. (2019).
The use of water indices is the basis of most employed techniques in order to segment satellite images into water and nonwater pixels (Apostolopoulos and Nikolakopoulos, 2021).The Normalized Difference Water Index (NDWI), which is a combination of green and near-infrared bands, emerges as a preferred tool (McFEETERS, 1996).However, it faces challenges in the presence of foam caused by wave action.To overpass NDWI, (Xu, 2006) therefore proposed another index, called Modified Normalized Difference Water Index (MNDWI), modified by replacing band 4 (0.76 − 0.90 µm) by band 5 (1.55 − 1.75 µm) of Landsat 5 TM.To enhance the separability between water and other surfaces also in the presence of shadow, (Feyisa et al., 2014) proposed the AWEI index.(Fisher et al., 2016) proposed a further improvement, after testing a new index called Water Index (WI) in Eastern Australia beaches.WI demonstrated its capability in shoreline detection in different scenarios.
Recently, the advent of machine learning and deep learningbased techniques represents a growing trend: they have shown to be capable of supporting automated shoreline extraction on a large scale and identifying patterns and trends difficult to discern conventionally Tsiakos and Chalkias (2023).
This study aims to test the capabilities of a shoreline extraction methodology that is being developed with the final goal of extending the application of SDS beyond simple shoreline mapping to a more dynamic analysis of coastal changes over time.to be more specific, several spectral indices, including NDWI, MNDWI, AWEI, and WI, were considered as inputs for two unsupervised classification methodologies, the Gaussian Mixture Model (GMM) and K-means.The performance of the developed method was assessed on three Mediterranean tide-less beaches, adapting it to input data from different satellite platforms such as S2 and PS, and using aerial orthomosaics as validation data.

Study sites
The study was conducted on three sandy coastlines within the Mediterranean: the beach in front of Castelldefels (CDF) and Gavà in Spain, and two beaches in Italy, Feniglia (FNG) Beach and the adjoining beach at Marina di Grosseto (MRN) (Figure 1).These locations, being part of the Mediterranean basin, feature minimal tidal oscillations and predominantly calm wave conditions with occasional storms.Some details on the three case studies are provided below: • The considered CDF beach area (top of Figure 1) is semiurban, extending over 10 km, consisting of fine sediments from the Llobregat River, and experiencing predominant waves from the East-Southeast (de Swart et al., 2020).
• FNG beach (middle of Figure 1), a 6km embayment beach forming one of the two spits enclosing the Orbetello lagoon, has been shaped by the Holocene sea level rise and wave diffraction through Monte Argentario Island, now connected to the mainland (Cipriani et al., 2004).It faces direct exposure to waves from the SE, S, and SW, with the first two impacting the entire coast while the SW waves significantly affect only the eastern stretch due to Monte Argentario, which partially protects the western part.
• The MRN beach segment (bottom of Figure 1) spans 4.5 km northward from the urban area, with the Ombrone River Delta experiencing significant erosion (Mammì Irene and Enzo, 2019).In this case, the dominant sea currents mainly come from the Southwest.

Materials
Two orthomosaics produced from data acquired on different dates were considered for reference and validation.The first, covering the two Tuscan beaches FNG and MRN, was provided by the Tuscany Region through the GEOscopio WMS (Web Map Service) portal.This product, freely accessible online, is available in four bands: NIR (Near-Infrared), Red, Green, and Blue, at a spatial resolution of 20 cm.The second was obtained from the Institut Cartogràfic i Geològic de Catalunya, it is available in three bands and it boasts a spatial resolution of 25 cm.
For what concerns the satellite imagery, both S2 and PS images were considered.The satellite images closest in temporal terms to the validation data were selected for each case study (Table 1).A short summary of PS and S2 missions and imagery characteristics is provided in the following.
The PS Dove constellation, with over 150 SmallSats at a 475 km altitude in a sun-synchronous orbit, offers four-band multi-spectral coverage with a ≈3.7 m ground sample distance and ≈10 m geolocation accuracy (Team, 2018).Despite lower spectral fidelity and variable radiometric quality, PS data provide higher spatial resolution over publicly available image datasets and a much higher temporal resolution (neardaily) over existing imagery providers (Schill et al., 2021).
The Sentinel-2 mission, part of the Copernicus program by ESA, provides medium-resolution optical images ranging from 10 to 60 meters across terrestrial and coastal areas (Jutz and Milagro-Perez, 2020).This mission encompasses a pair of satellites orbiting in tandem along the same path but staggered 180°apart, aiming to achieve a rapid revisit rate of every 5 days at the Equator.Equipped with an optical instrument, Sentinel-2 captures imagery across 13 spectral bands (ESA, 2015a). In

Methodology
This work presents a comprehensive test and validation of different spectral indices and shoreline extraction methods based on unsupervised classification.A fair and systematic comparison between the considered alternatives required the implementation of an ad hoc designed workflow, implemented in a Python environment (Figure 2).Some details on the implemented procedure are provided below.
First, a pre-processing step involved the resampling of different spatial Sentinel-2 bands to a common resolution of 10 m.Five spectral indices (NDWI, mNDWI, WI, AWEIshadow, and AWEI-no-shadow) were computed by exploiting the resampled S2 bands (Table 2).Differently, since Planet-Scope provided only 8 bands at the full spatial resolution of 3 m, then just the NDWI index was calculated with PS imagery.
Second, two unsupervised classification methods, namely Kmeans and GMM, were applied to the extracted spectral index rasters in order to distinguish water from land.Then, shoreline extraction from the classifier outputs was obtained with the following three-step procedure: • Contour extraction was performed by scanning binarized raster data to identify continuous lines delineating the two regions.The Marching Squares algorithm was used to such aim, setting a threshold value of 0.5, which implies that the extracted line passes through the central point of the boundary pixel.
• The longest contour identified in the Marching Squares algorithm output was selected as an approximation of the "real shoreline".
• Finally, the retrieved shoreline was smoothed.The applied smoothing algorithm adjusts each point on the contour line based on the positions of its neighbors, weighted by a smoothing factor.This process is iterated several times to gradually regularize the line shape.

Results
The accuracy of Sentinel-2 and PlanetScope-derived shorelines, named extracted shorelines hereafter, was evaluated by comparison with the reference shorelines, obtained from highresolution aerial orthomosaics.The comparison involved computing various metrics, utilizing cross-shore transects spaced at intervals of 10 meters.This methodical approach, known as "baseline and transect" (Apostolopoulos and Nikolakopoulos,

Index Formula
Sentinel-2 2021), allowed for a detailed assessment of the shoreline extraction techniques applied to the satellite data.
The comparison between reference and extracted shoreline, based on the baseline and transect method, was performed in this work as described in the following.A baseline, parallel to the reference shoreline, is defined on the land, some meters far from such shoreline.Then, transects are generated orthogonal to the baseline, equally spaced at 10-meter intervals, for both S2 and PS products.Each transect intersects both the reference and the extracted shorelines: the distance between them is evaluated along such transect lines, conventionally establishing a negative distance value when the extracted shoreline is closer to the baseline and positive vice versa.Finally, several statistical parameters, including Mean Absolute Distance (MAD), Bias, and Root Mean Square Error (RMSE) are calculated to statistically characterize the difference between the extracted shorelines and the reference ones.
The values of the statistical parameters computed to compare the extracted and reference shorelines are reported in Table 3.
The results indicate that the mean absolute distance of the extracted shoreline from the reference one ranges from 2 m to 5 m (i.e., sub-pixel accuracy) for Sentinel-2, and from 1.5 m to 2 m for PS imagery.The extracted-reference shoreline signed distance appears to have a biased distribution, in particular for the Sentinel-2 cases.Figure 3 shows the spatial variability of the extracted-reference shoreline signed distance values on three sections, each taken from one of the case studies, for the S2 (blue lines) and PS (yellow lines) spectral indexes-classifier combinations leading to the best results.Figure 3 confirms the previously mentioned bias on the obtained results for Sentinel-2 data.Nevertheless, given the spatial resolution of the satellite imagery (spatial resolution varies between 10, 20, and 60 meters across the different bands of Sentinel-2, while the limited number of available PlanetScope bands restricts the potential for extensive band combinations in this case), the outcomes show that sub-pixel accuracy was achieved in all the considered cases.

Discussion
The considered tests examined three tideless beaches in the Mediterranean basin: • The results on the CDF beach show sub-pixel accuracy for both the best index-method combination of S2 and for PS.The findings illustrate an almost linear relationship between the achieved accuracy and the initial spatial resolution, as also previously found in the literature (Bishop-Taylor et al., 2019).• The S2 and PS results are nearly equivalent to the FNG case.In this case study, the S2 results (MAD=2.16m, bias=0.92m) are very good, consistently lower than half of the pixel size (10 m).Conversely, the PS results (MAD=2.01m, bias=-1.03m) are quite comparable with the imagery spatial resolution of 3 m.A possible explanation for such different behavior of S2 and PS-based results could be that the best spectral index for S2 in this case turned out to be the WI, which also incorporates SWIR band data, not available for PS.
• The MRN case deserves separate considerations.The performance, for both S2 and PS imagery, was slightly worse than the other case studies, likely due to the more challenging context, transitioning from sandy beach, about thirty meters deep, to eroded stretches with vegetation close to the shoreline.From a radiometric perspective, this implies different behaviors of the spectral indices in such different conditions.
In agreement with other authors (McAllister et al., 2022), it was impossible to determine the best index-method combination, suitable for all the beaches under study.Approaches that rely on water indices are prevalent in studies for monitoring shoreline/coastline extraction.However, the use of single-band or single images can yield controversial results when expanding the image dataset.This inconsistency arises because each image may present different illumination conditions, necessitating adjustments to achieve stable results (Tsiakos and Chalkias, 2023).The use of additional spectral bands, or using different indexes as different bands, could also be useful for improving the results.
New advances could be brought about by the use of Deep Learning, which introduces new innovative concepts for semantic segmentation and classification tasks.Deep learning architectures have good generalization ability and could support different scenarios of land/water segmentation towards the extraction of shorelines (Tsiakos and Chalkias, 2023).
Following the analysis of on-site wave and tidal data, it was deemed that these did not influence the cases under study because the order of magnitude of the variations caused by tides was at least one time lower than the spatial resolution of the satellite images (Table 4).Therefore, no corrections were made to the shorelines obtained through the developed methodology.However, intending to increase the number of case studies and test dates, the availability of this kind of information can be of fundamental importance, as attested by several authors (Zollini et al., 2023) (Pucino et al., 2022).
Further advances in research may involve the assessment and correction of the georeferencing error associated with satellite imagery.ESA reports an accuracy of 11 m for S2 until 2021, and 6.7 m later ESA (2015b).Similar considerations apply to PSe data, which also carry issues of lower spectral fidelity, variable radiometric quality, and around 10 m geolocation accuracy (Team, 2018).

Conclusion
This study has demonstrated the utility of using various spectral indices and unsupervised classification methodologies for shoreline extraction from Sentinel-2 and PlanetScope satellite images.The obtained results show a considerable accuracy in shoreline mapping obtained using free satellite data and an ad hoc developed workflow, implemented in Python, which integrates pre-processing, spectral index computation, unsupervised classification (K-means and GMM), and shoreline extraction.
Different from other studies on this topic, which assess the method performance with a shoreline manually determined on the satellite imagery, the outcomes of the proposed methodology were validated by using shorelines extracted from highresolution aerial orthomosaics as references.These kinds of products are often available for free, offering an easy and convenient way to reliably validate the proposed method outcomes.
The obtained results have shown sub-pixel accuracy in shoreline extraction for all the considered case studies: MAD ranged from 2 m to 5 m and absolute value of the bias between 1 m and 3 m for S2 data, MAD between 1.5 m to 2 m and absolute value of the bias less than 1.03 m for PS data.The obtained performance can be considered remarkable, in particular in the S2 case (imagery spatial resolution ≈10 m).
In agreement with previous studies, the best combination indexmethod varies in the three cases.This can be considered a weakness, but it can be mitigated by trying to increase the automation of choosing the best index-method combination depending on the context.
In this work, tests were conducted on three Mediterranean sandy beaches, where the tide effect on the performed shoreline extraction can be considered minor.Nevertheless, our future investigations will consider also expanding the case studies to different scenarios in order to increase the consistency of the analysis, for instance including beaches with different granulometries, considering data at different temporal instants, and varying wave conditions.
Our future works will also dedicated to refining these methodologies by exploring the integration of machine learning and deep learning approaches, and, on the other hand, extending this study to complex coastal morphology e.g.megacusps or near-shore bar, and its evolution.

Acknowledgments
The use of PlanetScope images has been kindly granted under an Education and Research standard license from PlanetLabs.

Figure 3 .
Figure 3. Spatial variability of signed distance, in meters, of the extracted shoreline with respect to the reference one evaluated on some hundred-transect sections of the three case studies: a) Castelldefels, b) Feniglia and c) Marina di GR.Comparison between best results obtained with Sentinel-2 (blue lines) and PlanetScope imagery (yellow lines).

Table 2 .
Spectral indices used in this work.
Figure 2. The main steps carried out to SDS extraction and evaluation.

Table 3 .
Mean absolute distance (MAD), Bias and Root Mean Square Error (RMSE) obtained for the best methodologies (index and method) for each date and site.

Table 4 .
Auxiliary data checked for the analysis.Data from CDF were provided by the Ministry of Transport of Spain, which operates buoys and tide gauges.Data from FNG and MRN were provided by the Tuscany Region authority.