## 2 Materials and Methods
### SAR-SL Production and Quality Control Indicators
#### 2.4.2 Shoreline Filtering Based on Distance from the Reference Line  
For the second stage of the process, a novel approach has been developed. Its aim is to adequately select some of the points along the previously extracted SAR-SLs to generate a final product that can capitalize patterns of shoreline changes over time. The new method is composed of five steps: (1) heatmapping, (2) polygon creation, (3) point-to-line distance calculation, (4) calculation of Gaussian mixture distribution (GMD), and (5) mean distance. The first step, heatmapping, enables us to understand how the SLs are distributed in the scene under investigation. As a result of the previous collocation step, all the points along the SLs are aligned in a structured grid-like fashion. By examining both ASCand DESC tracks, for each point along the SLs, the number of lines passing through it is counted. This value is expressed in percentages based on the total number of lines (ASC plus DESC). The heatmap provides information regarding the dispersion of the SLs and aids in identifying relevant patterns in the scene. For further reduction in speckle, an initial filter based on the heatmap values may be applied for removing points located considerably far from the main concentration of SLs. Figure 5a illustrates an example of a heatmap where each color represents a percentage range. The points affected by noise (visible as white and pink dots) are easily identified, and once the noise has been removed, the primary concentration of SLs becomes evident (Figure 5b). The second step of polygon creation aims to simplify this analysis. The site under investigation is divided into a series of adjacent polygons (Figure 5c). These polygons are constructed along an RL, which can be either provided by the user or derived from the heatmap by observing the SL concentration values. The polygons are oriented perpendicularly to the RL. Their width (\(w\)) can be adjusted based on the user's preference, while their length (\(l\)) is determined either by the distribution of SLs and associated heatmaps or as per the user's request. It is recommended to include at least the points with higher heatmap values, excluding those that are far from the main concentration, which is often attributed to noise. Except in some complex geometries of the RL (in such cases, overlapping is inevitable), the polygons do not intersect with each other. In the third step, for each polygon, the distance (\(d_{i}\)) between each point along the SL and the RL, within the boundaries of the respective polygon, is calculated. This distance represents the minimum separation between individual SL points and the RL points. Figure 5d illustrates an example of this calculation. Additionally, a sign is associated with the distance; when a point along the SL is located seaward with respect to the RL, a positive sign is assigned to its distance value, whereas a negative sign is given when it is positioned land  
Figure 5: Shoreline filtering for Salinas beach: (**a**) heatmap distribution considering all SL points; (**b**) points following an initial filtering process, revealing a distinct and clear SL pattern; (**c**) polygon creation; (**d**) distance between each SL point and the RL (**b**). Source of aerial imagery: Google, ©2023 Maxar Technologies. Then, the SL points are filtered using the GMD technique. The SL distances (\(d_{i}\)) are assumed to be described statistically by a Gaussian model with \(m\) components. Each component of a mixture is defined by its mean, covariance, and mixing proportions. The Bayes information criterion (BIC) [34] is used to define the appropriate number of components for fitting data. The GMD with the lowest BIC is considered the most suitable model.