_`The user is presented with options to choose an algorithm for analysis (bathymetry, shoreline, coastal squeeze).`_
The SelectionPage is the initial page where users can choose the
analysis module. When the user selects the Shoreline Analyst option,
they are redirected to the ProcessingPage . This page displays options
for the user to choose the analysis module. When the user selects the
Shoreline Analyst option, they are redirected to the ProcessingPage .
### Bathemetry(props)
### push('/processing')
_`This is the main page for the bathymetry analysis process. It shows a stepper with the steps to configure the bathymetry processing. The steps are:`_
This function redirects the user to the ProcessingPage when they select
the Shoreline Analyst option.
#### SatelliteChooser
## ProcessingPage
_`Allows the user to select a satellite for the bathymetry analysis. The selected satellite is dispatched to the store.`_
The ProcessingPage is the page where users go through the steps of the
shoreline analysis.
#### AOIChooser
## ProcessingPage
_`Allows the user to draw an area of interest (AOI) on the map. The geometry of the AOI is dispatched to the store.`_
*Page that shows the processing of the selected algorithm (bathymetry,
shoreline or coastal squeeze).*
#### PeriodChooser
This page guides the user through the steps of the shoreline analysis.
The steps are as follows:
_`Allows the user to select a time period to search for images. The selected start and end dates are dispatched to the store.`_
1\. Choose Satellite: The user selects either the Sentinel-2 or Landsat
satellite for the analysis. 2. Set Region of Interest: The user draws a
polygon on the map to define the area of interest. 3. Set Period: The
user selects a start and end date to filter the available images. 4.
Filter Images: The user selects the desired images from the available
options. 5. Set Parameters: The user enters parameters such as transect
spacing, extension, and threshold. 6. Results: The results of the
shoreline analysis are displayed, including charts, statistics, and
exports.
#### BathymetryBandsAndAlgorithmSelection
### useSelector(getAcquisitionParameters)
_`Allows the user to select the bands and algorithm to apply in the bathymetry processing. The selected configuration is updated in the BathymetryResults object.`_
This function retrieves the acquisition parameters selected by the user
in the previous steps, including the satellite choice, region of
interest, period, selected images, and analysis parameters.
### ProcessingBathymetryPage
## AlgorithmCard
_`Shows the results of the bathymetry processing. The user can download the bathymetry image and view the generated statistics.`_
The AlgorithmCard component displays information for each step of the
shoreline analysis process. The cards specific to the Shoreline Analyst
steps are shown. This component shows a card with information for each
step of the shoreline analysis. The cards related to the Shoreline
Analyst steps are displayed.
## ProcessingPage(props)
## Function Calls within Shoreline Analysis Steps
_`Page that shows the processing of the selected algorithm (bathymetry, shoreline, coastal squeeze).`_` `
The following function calls are made within the Shoreline Analyst steps
_`Loops through a list of images and extracts the shorelines for each one, accumulating the results in a FeatureCollection. Returns the final FeatureCollection with all shorelines.`_
This function fetches the available images from the selected satellite
based on the defined region of interest and period. It returns a list of
images with metadata such as image ID, date, and cloud coverage
_`Applies a thresholding algorithm to extract the shoreline from a satellite image. Returns a FeatureCollection with the shoreline geometries.`_
This function creates transects (lines) within the defined region of
interest based on the user-entered parameters for transect spacing and
extension.
## Bathemetry/index.jsx
### extraction(images, threshold)
This file defines the bathemetry acquisition process page. It handles the steps and routes of the bathemetry acquisition process. It may include the following function calls:
This function extracts shorelines from the selected images. The
threshold parameter is used to determine the land-water boundary.
### BathymetryResults.isBathymetry()
### statistics(shorelines)
This function checks if the current page is the bathymetry page. It returns a boolean value, indicating whether the page is the bathymetry page or not.
This function calculates statistics for the extracted shorelines,
including Shoreline Change Envelope (SCE), Net Shoreline Movement (NSM),
End Point Rate (EPR), and Linear Regression Rate (LRR). It also
classifies the LRR using Esteves and Finkl (1998) intervals.
### BathymetryResults.getTrainingDataAsMatrix()
### transects(shorelines)
This function retrieves the training data from the session storage and parses it into a matrix format.
This function calculates the intersection points of the transects and
shorelines. It also computes summary statistics for each shoreline, such
This function calculates the median of an Earth Engine ImageCollection filtered by the given geometry and dates. The parameters collectionName , geometry , dtBegin , and dtEnd specify the collection to filter and the time range. It returns the thumbnail URL and the median Image.
#### **Inputs:**
### BathymetryResults.getSelectedImage()
No input parameters for this function.
This function acquires the selected Sentinel-2 image based on the chosen date and satellite mission. It handles using the median image if selected. The parameters date and satelliteMission specify the desired image. It returns the Image.
#### **Output:**
### BathymetryResults.mask(img)
Redirects to '/processing' page.
This function applies a cloud and water mask to the given Sentinel-2 Image. The img parameter represents the image to be masked.
#### **Use**
## ProcessingBathemetryPage/index.jsx
Call this function to redirect to the processing page.
This file represents the page that shows the results of the bathemetry process. It displays the predicted bathymetry image, statistics, and allows downloading the results. It may include the following function calls:
``` javascript
### BathymetryResults.getBathymetryImage()
push('/processing');
```
This function returns the bathymetry image calculated by the bathymetry algorithm.
### **useSelector(getAcquisitionParameters)**
### BathymetryResults.getBathymetryParams()
Extracts acquisition parameters from the store.
This function returns the visualization parameters for the bathymetry image.
This file represents the page that shows the results of the processing. It displays the processed image and allows downloading the results.
#### **Inputs:**
## components/\*
getAcquisitionParameters: Selector function to extract data from the
store.
The components folder contains various reusable components used throughout the application. These components may include UI elements, input fields, buttons, etc., which are utilized in the above-mentioned pages.
#### **Output:**
## Code Used in Bathymetry
acquisitionData: The acquisition parameters extracted from the store.
### **MainPage**
#### **Use**
This is the main page of the application. It contains the routes for the application and renders the appropriate components based on the route.
Call this hook to extract data from the Redux store.
``` javascript
constMainPage=({match})=>{
// Register the dialogs when the component is mounted
// Retrieve the globally extreme dates (earliest and latest)
constglobal=retrieveExtremes(available);
This function is used to handle routing in the application. Based on the route, it renders the appropriate page component.
// Compute the grid position of each image and sort in ascending order
constenhanced=available
.map(addGridPosition)
.sort(Metadata.GRID_POSITION);
### **Bathemetry**
// Retrieve the northeasternmost grid position within the specified bounds
constnortheasternPosition=ee
.Image(enhanced.toList(1).get(0))
.get(Metadata.GRID_POSITION);
This page handles the bathymetry analysis workflow. It contains the steps for bathymetry analysis like area of interest selection, image selection, bands and algorithm selection etc.
// Keep images in the slice where the satellite passed first (northeast)
This page handles displaying the results of the bathymetry analysis. It shows the predicted bathymetry image, statistics like RMSE, bias, slope etc. and provides options to download the results.
geometry: The geometry to generate transects within. transectSpacing:
The spacing between transects. transectExtension: The length of each
transect.
#### **Output:**
Renders the results of the bathymetry analysis like the predicted bathymetry image, statistics and download options.
A list of transect features.
#### **Use**
This function is used to display the results of the bathymetry analysis. It shows:
Call this generator function to generate transects within a given
geometry.
1\. The predicted bathymetry image 2. Statistics like RMSE, bias, slope etc. 3. Options to download the bathymetry image and statistics
``` javascript
It handles processing the bathymetry analysis based on the inputs provided in the previous steps and displays the results to the user.
yield*createTransects(geometry,100,500);
```
### **ProcessingPage**
### **extraction(images, threshold)**
This page handles displaying the results of the shoreline change analysis. It shows the shoreline change maps, transect report, transect evolution graphs and provides options to download the results.
Extracts shorelines from a list of images.
``` javascript
constProcessingPage=()=>{
// Get the analysis results from the store
const{transects,baseline,shorelines}=useSelector(
(state)=>state.shoreline.results
);
// Code to process the shoreline change analysis and get the results...
return (
<BoxclassName={classes.wrapper}>
{/* Render the results */}
</Box>
);
/**
* Extracts shorelines from the specified images.
* @param {ee.ImageCollection|ee.Image} images the input images
* @param {Number} threshold the threshold to binarize the images
*/
exportconstextraction=(images,threshold)=>{
// Cast to ImageCollection and filter invalid images
images: A list of images to extract shorelines from. threshold: The
threshold value for water segmentation.
#### **Output:**
Renders the results of the shoreline change analysis like shoreline change maps, transect report, transect evolution graphs and download options.
A list of shoreline features.
#### **Use**
This function is used to display the results of the shoreline change analysis. It shows:
Call this generator function to extract shorelines from a list of
images.
1\. Shoreline change maps 2. Transect report 3. Transect evolution graphs 4. Options to download the results
``` javascript
It handles processing the shoreline change analysis based on the inputs provided in the previous steps and displays the results to the user.
constshorelines=yield*extraction(images,0.2);
```
### **SelectionPage**
### **statistics(shorelines)**
This is the landing page of the application. It provides an overview of the capabilities of the application like bathymetry analysis, shoreline change analysis and coastal squeeze and options to start them.
Calculates shoreline change statistics.
``` javascript
constSelectionPage=()=>{
constdispatch=useDispatch();
const[t]=useTranslation();
constclasses=useStyles();
return (
<HomePageLayout>
<BoxclassName={classes.wrapper}>
{/* Render the options to start bathymetry analysis, shoreline change analysis and coastal squeeze */}
</Box>
</HomePageLayout>
/**
* Adds statistics about the distances observed in *transects*,
* such as StdDev and Mean.
* *Adds CASSIE internals props*
* @param {ee.List<Feature>} transects
* @param {ee.FeatureCollection} shorelines
* @returns {ee.FeatureCollection} the shorelines with added statistics
Renders the landing page of the application with options to start bathymetry analysis, shoreline change analysis and coastal squeeze.
Shoreline change statistics.
#### **Use**
This function is used to render the landing page of the application. It shows:
Call this generator function to calculate shoreline change statistics
from a list of shorelines.
1\. An overview of the capabilities of the application like bathymetry analysis, shoreline change analysis and coastal squeeze. 2. Options to start bathymetry analysis, shoreline change analysis and coastal squeeze.
``` javascript
When the user selects an option, they are navigated to the corresponding workflow.
conststats=yield*statistics(shorelines);
```
### **BathymetryBandsAndAlgorithmSelection**
### **transects(shorelines)**
This component is used to select bands and algorithm for bathymetry analysis. It shows options to select bands for the analysis and graphs to select the algorithm. It handles updating the store with the selected bands and algorithm.
Generates transects and calculates transect-based shoreline change
statistics.
``` javascript
constBathymetryBandsAndAlgorithmSelection=()=>{
constdispatch=useDispatch();
const[t]=useTranslation();
// Code to select bands and algorithm...
return (
<Box>
{/* Render options to select bands and graphs to select algorithm */}
shorelines: A list of shoreline features. transects: A list of transect
features.
#### **Output:**
Renders options to select bands and graphs to select the algorithm for bathymetry analysis.
Transect features with shoreline change statistics.
#### **Use**
This function is used to select bands and algorithm for bathymetry analysis. It shows:
1\. Options to select two bands for the analysis. 2. Graphs showing the relationship between the selected bands and depth. The user can select an algorithm by clicking on a graph. 3. It handles updating the store with the selected bands and algorithm so they can be used for bathymetry analysis.
### **AOIChooser**
This component is used to select the area of interest. It shows a map where the user can draw the area of interest and options to import it from a KML file. It handles updating the store with the selected area of interest.
Call this generator function to generate transects from shorelines and