SAR-BASED COASTLINE DETECTION AND MONITORING

The coastal environment is among the most fragile regions on our planet. Its efficient monitoring is crucial to properly manage human and natural resources located in this environment where a large portion of our population lives. The objective of this contribution is to design and develop a new set of methods suitable for detecting and tracking the coastline. Synthetic aperture radar (SAR) technology is chosen because of the characteristic response from water and the acquisition consistency allowed by constant illumination, day-and-night, and all-weather functioning. The proposed iterative detection method is based on superpixel segmentation. The resulting superpixels are filtered and then partitioned in land and water classes based on their median backscattering with Otsu’s algorithm. The rationale is that the segmentation can follow the coastline before the filtering can degrade the spatial resolution. A quantitative assessment of the results measures the distance to a manually-detected shoreline for the Lizard Island case study; the average distance is 12.63 m, with 80% of the sampled points within 20 m. The innovative coastline monitoring process exploits the consistency of SAR by analyzing a long time series. After a season-wise grouping, the land-water index is introduced to erase the time oscillation of water backscattering caused by different sea states. The proposed index is modeled in time on a pixel basis. A visualization technique that exploits the HSV codification of the color space highlights where and when changes happened. A case study for this technique is carried out over the Reentrancias Maranhenses natural area. A quality assessment shows good accordance with optical data that depicts the region’s dynamic.


INTRODUCTION
The coasts are the highly dynamical areas that define the boundary between land and water, be it an ocean, a sea, or a lake (Turner et al., 1998). This region hosts crucial infrastructures, ecosystems, and about 40% of the world's global human population (Martinez et al., 2007). The task of monitoring and managing the coastal areas are of considerable social and economic importance. The coastline (or shoreline) can be defined as the physical interface between land and water (Dolan et al., 1991). Our coasts undergo constant changes as rivers, currents, waves, and tides move sediments inside, outside, and within the nearshore zone. The human presence is also a strong footprint driver. Planned exploitation of coastal resources and side effects of other activities result in the deterioration of the litoral environment. Moreover, global warming induces ice melting that causes sea-level rise. The latter contributes to coastal erosion, especially in low-lying and flat areas, through a complex morphological adaptation (Mentaschi et al., 2018). Furthermore, shoreline erosion and coastal flooding are among the gravest effects of climate change according to the Intergovernmental Panel on Climate Change (IPCC) (IPCC, 1990).
Many in-situ methods for shore(line) monitoring are adopted, such as direct measuring of distances (Ferreira et al., 2006) and laser monitoring, cameras, and aerial photogrammetry. This kind of high-resolution data helps in the understanding of the coastal dynamic. However, the drawbacks are the highly local nature of the monitoring and the consistent costs (in terms of labor and equipment) if the goal is wide-area monitoring. Satellite remote sensing (RS), thanks to the availability of big data facilities dedicated to storage and elaboration (Gorelick et al., 2017) is a resource for coastline monitoring. Optical RS, because of its high resolution has been and is widely used for * Corresponding author coastline detection and monitoring (Garcia-Rubio et al., 2015), (Mentaschi et al., 2018), (Teodoro, 2016), (Toure et al., 2019).
Synthetic Aperture Radar (SAR), however, is an attractive alternative for the studied problem. The coastline detection task is possible with SAR scenes because of the distinctive response from water areas. The interaction of transmitted signal and earth's surface depends, among others, on the roughness of the scattering material. Since water in low wind conditions is smooth, the reflection is mainly specular, therefore the backscattering is very low. Water bodies could then be detected by simply thresholding the histogram of the amplitude SAR image (Ferrentino et al., 2020), (Spinosa et al., 2018). Satellitebased SAR also overcomes some typical drawbacks of optical RS. The illumination is precisely repeated between acquisitions, therefore no problems are present due to different illumination conditions. Moreover, its signal is in the microwave part of the spectrum and can penetrate the water droplets that form clouds. Revisit intervals of the European Space Agency (ESA) constellation Sentinel-1 are between 1 and 3 days depending on the latitude of the scene and therefore suitable for consistent monitoring.

METHODOLOGY
In this section, the proposed algorithms are described. The data sets are obtained with the Google Earth Engine (GEE) platform. The products used are Sentinel-1 high definition Ground Range Detected (GRD) scenes acquired with the Interferometric Wide (IW) setting. Thermal noise removal, radiometric calibration, and terrain correction are the preliminary operation that data on the platform undergoes. Moreover, additional preliminary operations such as image selection and temporal filtering are performed server-side with GEE. Finally, the proposed algorithms are implemented locally with a Python Jupyter notebook, and the final results are displayed with the QGIS software.

Coastline detection
SAR images are characterized by the so-called speckle: a spatial fluctuation of the amplitude due to the interaction of the electromagnetic wave with the scatterers on ground. Speckle is a disturbance for image interpretation and, in particular, for the recognition of the water-land boundary (Spinosa et al., 2018). An initial despeckling is required: the pre-processing for the proposed method consists of multi-temporal median filtering applied to a stack of 5 subsequent acquisitions. The algorithm's input is a single channel image with, for every pixel, the median value of the pixel intensity in the different acquisitions that compound the stack. In this case, the VH polarization is chosen over the co-polarized channel because of the higher distance of water and land spectral clusters (Ferrentino et al., 2020).
The first step of the developed algorithm for coastline detection consists in segmenting the image in groups of pixels sharing a common backscattering signature. A group of pixels is called superpixel. This convenient and compact representation of images is appropriate for subsequent computationally demanding problems. Different algorithms for superpixel segmentation are available in literature, and some of those were tested like Quickshift (Vedaldi and Soatto, 2008) and Felzenszwalb (Felzenszwalb and Huttenlocher, 2004), but the best suited for SAR single-channel scenes is the simple linear iterative clustering (SLIC). This clustering technique can segment an image in superpixels by adapting the K-means algorithm in a space that combines color values (proportional to the radar backscatter) and image coordinates (Achanta et al., 2010). The main parameters for the SLIC algorithm are: • Number of segments: it defines the number of cluster seeds at the first step of the SLIC algorithm. However, the final number of segments will vary because in each iteration some superpixels can be merged or split according to their size: a superpixel is split if larger than the maximum size or merged with an adjacent if smaller than the minimum size. This parameter is inversely related to the size of the superpixel. In this paper we will refer to superpixel size, which is independent of the analyzed area's size; • Compactness: this parameter defines the relative weight between coordinate features and color feature for the space definition. Large compactness yields to a square-shaped superpixel because the coordinate features will be more important than the color feature in the distance computation between pixels. On the other end, smaller compactness leads to a superpixel that fits better the image edges because the color feature of the pixel weights more.
In Figure 1 it is possible to appreciate the segmentation with varying numbers of superpixels and compactness. If the superpixel has a large size, the edge doesn't follow small features, like the small island in the lower right part of the image. For what concerns the compactness, it is possible to note the squared shape of superpixels on the left part of the image; while on the right the edges follow objects with lighter contrast.
The superpixels are used as a processing unit for filtering: it is a special case of spatial adaptive filtering with a very flexible filter shape that fits the area's morphology. The goal is to further reduce the speckle effect, and at the same time to keep the spatial details that characterize a coastline. The median value of all the pixels inside a superpixel is computed and the value is assigned as a unique value for that specific superpixel. The median operator is chosen for its robustness against outliers. Figure 2 shows the result of the filtering. Every spatial filtering operation induces a loss in spatial resolution. Despite this, if superpixels can fit accurately the coastline, the resolution of the final result is not degraded by the filtering.
The final task is to define a suitable threshold that partitions the classes of water and land based on the single-channel information of backscattering amplitude. Otsu's method is a nonparametric and unsupervised method of automatic threshold selection for picture segmentation (Otsu, 1979). It can efficiently identify the optimal partition value for a bimodal histogram. The objective function to be maximized is the inter-class variance. Note that the goal is the same as the minimization of the intra-class variance. In Figure 3, the bi-modal histogram of the Lizard Island segmented with a superpixel size of 625 pixels and compactness equal to 3 is shown. The red line represents the threshold obtained with Otsu's method.
When segmenting an image with the SLIC algorithm, a tradeoff is present. The larger the superpixel the larger the filtering effect, hence small features (like tiny islands and small water bodies inside the coast) can be disregarded by the algorithm. On the other end, the larger the superpixel the worst the edge will follow the coastline details. To overcome these issues, an iterative approach can be used. The steps are depicted in Figure 4. The first four steps perform a rough coastline detection, while the remaining will refine the result.
1. Large superpixel segmentation: the parameters for the first segmentation with the SLIC algorithm are:  Figure 2. Median filtering based on the superpixels region. The original data is a stack of 5 Sentinel-1 VH band acquired over the Lizard island, Australia.
• Compactness: 3 • Sigma: 1 2. Median filtering: the superpixels are filtered by assigning to the whole superpixel the median value of its pixels.
3. Thresholding with the Otsu's method. In panel 3, the borders between the obtained land and water classes are shown. This is a first rough approximation of the detected shoreline.
4. Coast selection: the superpixels that lie at a maximum distance of 50m from the borders highlighted in panel 3 are selected. In Figure 4, on panel 4 the purple area represents the selected region for the following high-resolution processing. The superpixel size is decreased to be able to follow the coastline with greater accuracy. The parameters are: • Superpixel size: 60 pixels • Compactness: 1.5 • Sigma: 1 6. The filtering is performed again with the median operator: the median value of each superpixel is assigned to the pixels in the group. In this step, the selected areas are finely filtered. However, in panel 6 also larger superpixels are shown in the not-selected region. It is possible to see how the smaller superpixel has a smaller filtering power.  This algorithm's parameters are manually tuned with the visual inspection of the intermediate results. In many case studies two iteration were enough to capture the details of the coastline and avoid the presence of false islands or water bodies. In the next Section, the results of this algorithm are compared to optical imagery.

Coastline monitoring
The proposed coastline monitoring approach exploits a long time series of Sentinel-1 acquisitions to extract information about the coastline shift in time. The proposed approach can detect erosion and accretion phenomena by selecting the pixels that change in land cover during the studied period. In the following we list the pre-processing operations operated with GEE: 1. The acquisitions are grouped by season for a total of 16 seasons. The season with the least number of scenes has seven measurements. Hence, this number of acquisitions is selected for each season.
2. For every selected acquisition the product of the cross-and co-polarized channels is computed and adopted as metric: 3. A pixel-wise temporal filter on the 7 images stack is applied through the average operator.
The r metric is chosen because it empirically shows to maximize the land-sea contrast. When the average operator is applied, the reduction in the speckle presence is proportional to the number of considered scenes. Hence an equal number of acquisitions for each season should be considered because every season should have the same reduction factor. The unit period of a season is a trade-off between the need of a large number of acquisitions to obtain enough despeckling and the need of a sufficient number of data points in the time-series of four years.
The averaging also permits speckle reduction and erasing of temporary effects due to extreme events. SAR systems provide a great opportunity for monitoring because of the orbit repetition and constant illumination. The backscattering from the land areas presents stability when no changes occur. However, sea backscattering is not constant in time since it varies with the wave height (Tajima et al., 2019). The result is an oscillation of the sea backscattering value in the seasonal time series obtained with the pre-processing as Figure 5 shows. The left part of the histograms, with low r values, has a variation in time depending on the average sea state and wave height of the season. In this work we propose the introduction of the normalized land water index (NLWI). This index normalizes the effect of seastate within the season scene. For the NLWI computation, the estimation of the Gaussian mixtures for each seasonal scene is required. A mixture model is a probabilistic model for representing sub-populations presence within an overall population. For the problem of a SAR scene of a coastal region, the prior hypothesis is the existence of two groups of pixels, representing the sea and land pixels modeled with a Gaussian density function. The NLWI can then be computed as: The required parameters for the computation are the mean of the two sub-populations µ l i and µ l i , and the threshold Ti computed as the intersection of the two Gaussian distributions. The index i represents the season, while the index j is the pixel position in the image. The estimation of these parameters for the Spring 2019 scene -which is the 10th season of the analysisis depicted in Figure 6. Through NLWI, inter-temporal comparison of pixel values is possible. This index has a particular histogram with positive values assigned to land-pixels backscattering and negative values assigned to sea-pixels. Moreover, the two clusters will be centered in ±1. This is a soft classification that is not meant to define two clusters in each time series, but to describe the relative position of the pixel in the land-sea backscattering spectrum.
The NLWI time series of a single pixel can be modelled with a simple linear relation. Two parameters -angular coefficient and intercept -are estimated on a pixel basis. If the backscatter decreases in time it means that the pixel is being covered with water. Many pixels will present a variation in time, but the monitoring task requires detecting areas that change the cover in the monitored period. The eroded pixels are selected if the model intercepts the horizontal axis and has a negative angular coefficient. Another map is produced for the accretion areas: the pixels are selected if the model intercepts the horizontal axis and has a positive angular coefficient. Besides, the date when the change happened (the time instant of the zero-crossing) is an important parameter that is estimated. Figure 7 shows the model fitting to data belonging to pixels with different behavior. The two upper squares represent pixels that are stable in their land-covering. They are characterized by a very low angular coefficient and no intersection with the land-sea border. The lower squares represent pixels that change the land use in the analyzed period. The left one depicts a pixel that transformed from sea to land. The right one represents an erosion phenomenon: at the beginning, the pixel was classified as land, while from spring 2017 the pixel is sea. In this pixel, note that the model can estimate a change-date close to the boundary of the time series. The angular coefficient can be considered the velocity of accretion or erosion of a certain area.

Stable Land
Beach accretion Eroded Land Stable Sea Figure 7. Linear regression for single pixels belonging to different groups. Each point in the time series is the NLWI resuming the pixel state for a whole season. In the two squares above represent stable areas. The lower squares represent two dynamic pixels that mutates the land-cover.
The model, combined with the preprocessing and the NLWI, can extract information from the large SAR data-set. However, an appropriate visualization of the change date is necessary to allow for a proper interpretation. When dealing with spatial data a map is the best option. The focus here is on the visualization of the change date.
The hue, saturation, value (HSV) color space is adopted. It was developed to align with how human perceive color-making attributes. Figure 8 depicts the HSV color space as a cylinder. The hue represents the color angle on the cylinder. This attribute carries the most important information: the change date that is computed as the horizontal intercept of the estimated linear model. The value of each pixel depends on the average post-change NLWI. A color with 0% value is pure black, while a color with 100% value has no black mixed. The closer the NLWI to the new class (land or water: ±1) the higher the value.
The saturation of each pixel depends on its residual mean squared error (RMSE) of the fitting. The saturation controls the amount of color used: a color fully saturated will be the purest color possible, while no saturation yields a greyscale color. The smaller the RMSE the larger the saturation. Finally, every pixel whose model presents a horizontal intercept in the analyzed period is plotted according to the previous rules. The result is showed in Figure 12.

CASE STUDIES
In this Section, the results of the two proposed algorithms are analyzed. For the coastline detection algorithm, a quantitative analysis is carried out, while for the monitoring approach the lack of proper ground truth data allowed us just a visual comparison of the results with optical imagery.

Coastline detection results
The results for the proposed iterative routine are analyzed. The implementation details are explained in Section 2.1.  Figure 9 shows the detected coastline in green and Planet SkySat imagery with a 0.8 m pixel spacing. In pink, there is also the manually digitized coastline with the optical data as a reference. In general, it is possible to state that there are no Figure 9. The SAR based detected coastline (in green) extracted with the process explained in Section 2.1 is compared to the manually digitized coastline (in green) based on the optical imagery Planet SkySat (0.8 m pixel spacing), by ©Planet Labs Inc. On the right there is an enlarged view to appreciate finer details.
apparent georeferencing problems, as there is not a systematic direction of the error. In the western part of the island, the detected coastline is -in many sections -so close to the manual digitized one that the two lines overlap. In the enlarged part, on the right, it seems that the detected coastline follows better the background reference in the sandy beach. On the other end, the detection is worse where the coast is high. Where the terrain morphology presents cliffs or sloppy areas, mechanisms like layover, foreshortening or shadowing could make the recognition of the coastline less accurate.
On the manually digitized coastline, points are selected with a 50 m spacing. For each vertex, the minimum distance from the detected shoreline is computed. Figure 10 depicts the distribution of the computed distances grouped by the pixel size of 10 m. Each point for which the distance is lower than ten meters (the pixel spacing) will fall in the first bin. The vast majority of the selected vertexes lie closer than two pixels from the digitized counterpart. The average distance is 12.63 m. To contextualize this number it is crucial to note that the pixel spacing is ten meters but the resolution for the GRD product used for the computation varies between 20.4 · 22.5 m 2 and 20.5 · 22.6 m 2 (range · azimuth) depending on the incident angle. The resolution is defined as the minimum distance between two objects that a measurement instrument can distinguish. A result with an average distance closer than half of the resolution The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B3-2021 XXIV ISPRS Congress (2021 edition) Figure 10. The graph depicts the distribution of the distance between the manually digitized coastline and the detected coastline. To compute it, about 360 points were selected on the digitized coastline with a 50 m spacing and the minimum distance to the detected coastline is computed.
with input limited to SAR data and an unsupervised approach is considered out of reach. Figure 11 depicts the cumulative distribution. It is possible to appreciate that for 80% of the points, the distance is less or equal to 20 m. For 95% of the points, the distance is smaller than 30 m. Figure 11. The graph depicts the cumulative distribution of the distance between points 363 points equally spaced by 50 m on the manually digitized coastline visible in Figure 9 and their closest point on the coastline detected by the proposed algorithm.

Coastline monitoring results
In this part, the results of the monitoring approach applied in the natural area of the Reentrâncias Maranhenses are analyzed.
Here, accretion and erosion phenomena are attributed to strong oceanic waves and tidal currents that can move large quantities of sand (Magris and Barreto, 2010).   Figure 13 depicts the eroded area in the analyzed years. Four optical acquisitions are compared. The search is focused on the first quarter of each year. The best image in that period is chosen, but for the years 2017 and 2020, the best cloud-free acquisition of the area is only in late March. This demonstrates the difficulty to obtain consistent data in the tropic climate.
The four optical acquisitions do not present the same tidal height. However, the coastal position comparison with the graduated transect confirms the algorithmic results. The vegetated area shrunk year by year. The disappearance date (according to the monitoring method) for the four investigated points is from outer to inner: 2 nd quarter of 2017, 4 th quarter of 2017, beginning of 2019, 3 rd quarter of 2020.  Figure 13. The optical acquisitions operated by ©Planet Labs Inc. Each acquisition shows the state of the coast at each year, but tidal level could be different for each panel. However, it is possible to appreciate the regression of the vegetated area. The black transect with the gridded bar is the same one that was on Figure 12, so that a comparison with the SAR analysis is possible.
With optical imagery, the shoreline detection is not trivial because of the similar color between dry sand, wet sand, and shallow waters that is the object of the optical measurement systems. In contrast, SAR-based systems investigate a different physical parameter: the roughness of the interacting object. The surface might be smooth for both wet sand and shallow water, but for dry sand and vegetation, the roughness is substantially different. Hence the backscattered signal presents more peculiarity that makes the coastline detection easier. Besides that, the ability to acquire measurements consistently allows for temporal filtering that can erase the tidal effect that would negatively influence the long-term analysis.

CONCLUSIONS
SAR imaging is a suitable method for the tasks of coastline detection and its monitoring in time. The distinctive water response, in addition to the ability to work day-and-night and in all weather conditions make this technology preferable to optical system if the goal is frequent and consistent monitoring.
Coastal detection is tackled in literature with a variety of methods that span from simple pixel-wise, amplitude-based processing to very sophisticated deep learning algorithms. The approach that this contribution proposes can be described as an unsupervised approach, taking the definition from the machine learning field. A new iterative coastline detection algorithm has been developed with the adoption of processes related to image segmentation -like SLIC -and statistical analysis, like the Gaussian mixtures model or Otsu's histogram thresholding method. The validation is carried out by comparing the method's results over the Lizard Island with a manually detected shore with optical imagery. The average distance between the detected and digitize coastline is 12.63 m and 80% of the two lines are separated by less than 20 m.
We propose also an innovative approach for shoreline monitoring that exploits the consistent acquisitions of the Sentinel-1 mission. A long-term data-set allows erasing the tidal level variation by averaging on a seasonal basis. Moreover, the proposed NLWI index overcomes issues in comparing images with different sea or wind states. The map visualization of the changedate -estimated through a linear model of NLWI with time -proved to be an effective information carrier. The fact that SAR has a constant illumination source enables temporal averaging and makes the technology suitable for long term monitoring. The possibility to compare a large number of measurements acquired consistently over time makes the individuation of trends possible and worth to investigate for the understanding of coastal dynamics. Future developments include the validation with proper ground truth data and the adoption of a more complex NLWI-time model to describe different dynamics.