+ Summary
+ CoastSeg is an interactive browser-based
+ program that aims to broaden the adoption of satellite-derived
+ shoreline (SDS) detection workflows among coastal scientists and
+ coastal resource management practitioners. SDS is a sub-field of
+ coastal sciences that aims to detect and post-process a time-series of
+ shoreline locations from publicly available satellite imagery
+ (Luijendijk
+ et al., 2018;
+ Turner
+ et al., 2021;
+ Vitousek,
+ Buscombe, et al., 2023). CoastSeg is a
+ Python package installed via pip into a conda
+ environment that serves as an toolkit for building custom SDS
+ workflows. CoastSeg also provides full SDS
+ workflow implementations via Jupyter notebooks and Python scripts that
+ call functions and classes in the core CoastSeg
+ toolkit for specific workflows. CoastSeg provides two fully
+ functioning SDS workflows, and its design allows for collaborators in
+ the SDS software community to contribute additional workflows. All the
+ code, notebooks, scripts, and documentation are hosted on the
+ CoastSeg GitHub repository
+ (Fitzpatrick
+ et al., 2024).
+ So-called ‘instantaneous’ SDS workflows, where shorelines are
+ extracted from each individual satellite image rather than temporal
+ composites
+ (Bishop-Taylor
+ et al., 2021;
+ Pardo-Pascual
+ et al., 2012), follow a basic recipe, namely 1) waterline
+ estimation, where the 2D (x,y) location of the land-sea interface is
+ determined, and 2) water-level correction, where the waterline
+ location is mapped onto a shore-perpendicular transect, converted to a
+ linear distance along that transect, then corrected for water level,
+ and referenced to a particular elevation contour on the beach
+ (Vos
+ et al., 2019). The resulting measurement is called a
+ ‘shoreline’ and it is the location that the waterline intersects a
+ particular elevation datum. Water level corrections typically only
+ account for tide
+ (Vos
+ et al., 2019), but recently SDS workflows have incorporated
+ both wave setup and runup correction, which are a function of the
+ instantaneous wave field at the time of image acquisition
+ (Castelle
+ et al., 2021;
+ Konstantinou
+ et al., 2023;
+ Vitousek,
+ Buscombe, et al., 2023;
+ Vitousek,
+ Vos, et al., 2023).
+ CoastSeg has three broad aims. The first aim
+ is to be a toolkit consisting of functions that operate the core SDS
+ workflow functionalities. This includes file input/output, image
+ downloading, geospatial conversion, tidal model API handling, mapping
+ 2D shorelines to 1D transect-based measurements, and numerous other
+ functions common to a basic SDS workflow, regardless of a particular
+ waterline estimation methodology. This waterline detection algorithm
+ will be crucial to the success of any SDS workflow because it
+ identifies the boundary between sea and land, which serves as the
+ basis for shoreline mapping. The idea behind the design of
+ CoastSeg is that users could extend or
+ customize functionality using scripts and notebooks.
+ The second aim of CoastSeg is therefore to
+ provide fully functioning SDS implementations in an accessible browser
+ notebook format. Our principal objective to date has been to
+ re-implement and improve upon a popular existing toolbox,
+ CoastSat
+ (Vos
+ et al., 2019), allowing the user to carry out the
+ well-established CoastSat SDS workflow with a
+ well-supported literature
+ (Castelle
+ et al., 2021,
+ 2022;
+ Konstantinou
+ et al., 2023;
+ McLean
+ et al., 2023;
+ Vandenhove
+ et al., 2024;
+ Vitousek,
+ Vos, et al., 2023;
+ Vos,
+ Harley, et al., 2023;
+ Vos,
+ Splinter, et al., 2023;
+ Warrick
+ et al., 2023), but in a more accessible and convenient way
+ within the CoastSeg platform. In order to
+ achieve this, we developed CoastSat-package
+ (Vos
+ & Fitzpatrick, 2023), a Python package that is installed
+ into the CoastSeg conda
+ environment. CoastSat-package contains
+ re-implemented versions of the original
+ CoastSat codes, addresses the lack of pip or
+ conda installability of CoastSat, and isolates
+ the CoastSeg-specific enhancements from the original
+ CoastSat code. These improvements include
+ additional image download filtering, such as by cloud coverage in the
+ scene, additional parameters to control shoreline extraction, and more
+ accessible output formats, all while retaining the foundational
+ elements of the original CoastSat code. The
+ CoastSeg re-implementation of the
+ CoastSat workflow is end-to-end within a single
+ notebook. That notebook allows the user to, among other tasks: a)
+ define a Region of Interest (ROI) on a webmap, and upload geospatial
+ vector format files; b) define, download and post-process satellite
+ imagery; c) identify waterlines in that imagery using the
+ CoastSat method
+ (Vos
+ et al., 2019); d) correct those waterlines to elevation-based
+ shorelines using tidal elevation-datum corrections provided through
+ interaction with the pyTMD
+ (Sutterley,
+ 2024) API; and e) save output files in a variety of modern
+ geospatial and other formats for subsequent analysis. Additionally,
+ CoastSeg's toolkit-based design enables it to
+ run as non-interactive scripts, catering to larger scale shoreline
+ analysis projects.This flexibility ensures that
+ CoastSeg can accommodate a wide range of
+ research needs, from detailed, interactive exploration to extensive,
+ automated analyses.
+ The third and final aim of CoastSeg is to
+ implement a method to carry out SDS workflows in experimental and
+ collaborative contexts, which aids both oversight and reproducibility,
+ as well as practical needs based on division of labor. We do this
+ using sessions, a mechanism for saving the
+ current state of the application into a session’s folder. This folder
+ contains all necessary inputs, outputs, and references to downloaded
+ data used to generate the results. Sessions
+ allow users to iteratively experiment with different combinations of
+ settings and make CoastSeg fully reproducible
+ because everything needed to reproduce the session is saved to the
+ folder. Users can share their sessions with
+ others, enabling peers to replicate experiments, build upon previous
+ work, or access data downloaded by someone else. This simplifies
+ handovers to new users from existing users, simplifies teaching of the
+ program, and encourages collective experimentation, which may result
+ in better shoreline data. Users might expect to adjust settings across
+ several sessions to find the optimal configuration for each site,
+ typically requiring two to five adjustments to achieve the best
+ quality shorelines.
+ CoastSeg is also designed to be extendable,
+ serving as a hub that hosts alternative SDS workflows and similar
+ workflows that can be encoded in a Jupyter notebook built upon the
+ CoastSeg and
+ CoastSat-package core functionalities.
+ Additional notebooks can be designed to carry out shoreline extraction
+ using alternative methods. We provide an example of an alternative SDS
+ workflow based on a deep-learning based semantic segmentation model
+ that is briefly summarized at the end of this paper. To implement a
+ custom waterline detection workflow the originator of that workflow
+ would contribute a new Jupyter notebook, and add their specific
+ waterline detection algorithm to the CoastSeg
+ source code, so it could be used in their notebook’s
+ implementation.
+
+
+ Statement of Need
+ Coastal scientists and resource managers now have access to
+ extensive collections of satellite data spanning more than four
+ decades. However, it’s only in recent years that advancements in
+ algorithms, machine learning, and deep learning have enabled the
+ automation of processing this satellite imagery to accurately identify
+ and map shorelines from imagery, a process known as Satellite-Derived
+ Shorelines, or SDS. SDS workflows
+ (Almonacid-Caballer
+ et al., 2016;
+ Garcia-Rubio
+ et al., 2015) are gaining rapidly in popularity, particularly
+ since the publication of the open-source implementation of the
+ CoastSat workflow
+ (Vos
+ et al., 2019) for instantaneous SDS in 2018
+ (Vos
+ et al., 2019). Existing open-source software for SDS often
+ requires the user to navigate between platforms (non-reproducible
+ elements), develop custom code, and/or engage in substantial manual
+ effort.
+ We built CoastSeg with the aim of enhancing
+ the CoastSat workflow. Our design streamlines the entire shoreline
+ extraction process, thus facilitating a more efficient experimental
+ approach to determine the optimal combination of settings to extract
+ the greatest number of accurate shorelines.
+ CoastSeg achieves these improvements through
+ several key advancements: it ensures reproducible sessions for
+ consistent comparison and analysis; introduces additional filtering
+ mechanisms to refine results; and provides an interactive user webmap
+ that allows users to view the quality of the extracted shorelines.
+ Further, CoastSeg has been designed
+ specifically to host alternative SDS workflows, recognizing that it is
+ a nascent field of coastal science, and the optimal methodologies for
+ all coastal environments and sources of imagery are yet to be
+ established. Therefore, CoastSeg provides a
+ means with which to extract shorelines using multiple methods and
+ adopt the one that most suits their needs, or implement new
+ methods.
+ We summarize the needs met by the CoastSeg
+ project as follows:
+
+
+ A re-implementation of (and improvement of) the
+ CoastSat workflow with pip-installable APIs
+ and coastsat-package.
+
+
+ A browser-based workflow and an interactive mapping interface
+ provided by Leafmap
+ (Wu,
+ 2021).
+
+
+ A more accessible, entirely graphical and menu-based SDS
+ workflow, with no (mandatory) exposure of source code to the
+ user.
+
+
+ A session system that streamlines the experimentation process
+ to find the settings that extract optimal shorelines from
+ satellite imagery.
+
+
+ Improved core SDS workflow components, such as a faster and
+ more seamless tidal correction workflow, and faster image
+ downloading.
+
+
+ Consolidation of workflows in a single platform and reusable
+ codebase.
+
+
+ An extendable hub of alternative SDS workflows in one
+ location.
+
+
+
+
+ Project Roadmap
+ We intend CoastSeg to be a collaborative
+ research project and encourage contributions from the SDS community.
+ As well as implementing alternative SDS waterline detection workflows,
+ other improvements that could continue to be made include more (or
+ more refined) outlier detection methods, image filtering procedures,
+ and other basic image pre- or post-processing routines, especially
+ image restoration on degraded imagery
+ (Vitousek,
+ Buscombe, et al., 2023). Such additions would all be possible
+ without major changes to the existing CoastSeg
+ toolkit.
+ Integration of new models for the deep-learning workflow are
+ planned, based on Normalized Difference Water Index (NDWI) and
+ Modified Normalized Difference Water Index (MNDWI) spectral indices,
+ as is a new CoastSeg toolbox extension for
+ daily 3-m Planetscope imagery
+ (Doherty
+ et al., 2022) from Planet Labs. Docker may be adopted in the
+ future to manage dependencies in the conda
+ virtual environment required to run the program. Other sources of
+ imagery and other spectral indices may have value in SDS workflows,
+ and we encourage SDS users to contribute their advances through a
+ CoastSeg Jupyter notebook implementation.
+ It would also be possible to incorporate automated satellite image
+ subpixel co-registration in CoastSeg using the
+ AROSICS package
+ (Scheffler
+ et al., 2017). This would co-register all available imagery to
+ the nearest-in-time LandSat image. Furthermore, future work could
+ include accounting for the contributions of runup and setup to total
+ water level
+ (Vitousek,
+ Vos, et al., 2023;
+ Vos,
+ Splinter, et al., 2023). In practice, this would merely
+ add/subtract a height from the instantaneous predicted tide, then
+ apply horizontal correction. However, the specific methods used to
+ estimate runup or setup from the prevailing wave field would require
+ integration with observed or hindcasted databases of wave
+ conditions.
+
+
+ Acknowledgments
+ The authors would like to thank Qiusheng Wu, developer of
+ Leafmap, which adds a lot of functionality to
+ CoastSeg. Thanks also to the developers and
+ maintainers of pyTMD,
+ DEA-tools, xarray, and
+ GDAL, without which this project would be
+ impossible. We would also like to thank Freya Muir and Floris Calkoen
+ for reviewing CoastSeg. We acknowledge
+ contributions from Robbi Bishop-Taylor, Evan Goldstein, Venus Ku,
+ software testing and suggestions from Catherine Janda, Eli Lazarus,
+ Andrea O’Neill, Ann Gibbs, Rachel Henderson, Emily Himmelstoss,
+ Kathryn Weber, and Julia Heslin, and support from USGS Coastal Hazards
+ and Resources Program, and USGS Merbok Supplemental. Any use of trade,
+ firm, or product names is for descriptive purposes only and does not
+ imply endorsement by the U.S. Government.
+
+
+