Skip to content

Getting Started

Prerequisites

1.Sign up to use Google Earth Engine Python API

  • Request access to Google Earth Engine at https://signup.earthengine.google.com/

  • It takes about 1 day for Google to approve requests.

Installation & SetUp

1.Activate the coastseg conda environment

1
conda activate coastseg
  • If you have successfully activated coastseg you should see that your terminal's command line prompt should now start with (coastseg).

coastseg activated in anaconda prompt

2.Download CoastSeg from GitHub

1
git clone coastseg --depth 1 https://github.com/Doodleverse/CoastSeg.git

Extract Shorelines

1.Launch Jupyter Lab

  • Run this command in the coastseg directory to launch the notebook SDS_coastsat_classifier
1
2
conda activate coastseg
jupyter lab SDS_coastsat_classifier.ipynb

2.Authenticate with Google Earth Engine

  • Run the cell located under 'Authenticate with Google Earth Engine (GEE)'

auth_cell_cropped

3.Draw an Bounding Box

  • Draw a bounding box along the coast in this box is where ROIs will be created

Option 1: Draw a Bounding Box with the box tool

draw_bbox

Option 2: Draw a Bounding Box with the polygon tool

  • This is useful if you have back - barrier shorelines that you don't want to include

draw_bbox_polygon_remove_back_barrier

4.Generate ROI (Region of Interest)

  • ROIs can only be generated along a shoreline

  • If no shoreline is found then an error message will appear telling you no ROIs can be created. If this happens create your own reference shoreline following the guide here How to Create Reference Shoreline

generate_roi

5.Load Transects

  • Make sure there are transects inside the ROI you have selected otherwise you won't be able to extract shorelines

  • If there isn't a reference shoreline or any transects available for your site check out the guide on how to upload your own here

load_rois_then_transects_on_map_demo

6.Modify the Settings

  • Change the satellites to L8 and L9

  • Change the dates to 12/01/2023 - 03/01/2024

  • Change the size of the reference shoreline buffer

  • Click Save Settings

save_settings_getting_started_circle

7.Name the Session

  • Let's call this 'demo_session'

  • This is the name of the folder that will be saved in CoastSeg/sessions

  • It will contain a subdirectory for each ROI that shorelines will be extracted for

save_demo_session

8.Preview the available Imagery

  • Preview the amount of available imagery for the selected ROI between the dates

  • In this example ROI 'cwm3' has 18 images available from LandSat 8 and 16 images available from LandSat 9 for the date range

case study 1 preview imagery

9.Download the ROIs

  • Click the ROIs you want to download on the map ( they will turn blue when selected)

  • If no transects or reference shorelines are available for the region you have uploaded follow the guide here

  • NEVER rename your ROIs this is because CoastSeg keeps track of the filename in the 'config.json' and you won't be able to load it into CoastSeg again if you do. The ROI's ID is the filename so that information will be lost if you rename it.

case_study_1_download_roi

10.Extract Shorelines save_settings_download_extract

  • Extracting shorelines works by finding the land water interface in the image and drawing a line along it

  • A time series of shoreline position along each transect is generated as well

shoreline_transect_intersection

Apply Tidal Correction to Extracted Shorelines (Optional)

1.Download the tide model

2.Load the Session with Extracted Shorelines

  • Re-open the jupyter notebook

  • Under the 'Kernel' menu Click 'restart and clear outputs of all cells'

restart kernel and clear outputs of all cells

  • Click 'Load Session' and load 'sample_session'

select load session and tide correct

3.Click Correct Tides

  • Click the ROI ID from the dropdown

    -- You should see some extracted shorelines on the map if you don't then the ROI ID won't appear in the dropdown

  • Enter Beach Slope

  • Enter Beach Elevation relative to Mean Sea Level

select roi id for tide correction

load_session_correct_tides_demo