Coder Social home page Coder Social logo

betolink / automated-glacier-terminus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jukesliu/automated-glacier-terminus

0.0 1.0 0.0 429.72 MB

Code to automatically pick glacier terminus positions in Landsat imagery.

Shell 0.45% Python 7.71% Tcl 1.66% Jupyter Notebook 90.18%

automated-glacier-terminus's Introduction

automated-glacier-terminus

This code automatically delineates marine glacier terminus positions in Landsat 7 and Landsat 8 imagery using the adapted 2D Wavelet Transform Modulus Maxima (WTMM) segmentation method (Liu et al., 2021). The 2D WTMM method calculates gradients in brightness throughout each image at 50 unique spatial scales and produces maxima chains correpsonding to the maximum brightness gradients. These maxima chains delineate regions of high contrast in brightness, such as the glacier terminus margin. The terminus line is selected through an optimized thresholding approach. Relative terminus positions are calculated along three glacier flowlines, as such:

fig

For more details, please see:

Liu,J., Enderlin, E. M., Marshall, H.P., and A. Khalil (2021). Automated Detection of Marine Glacier Calving Fronts Using the 2-D Wavelet Transform Modulus Maxima Segmentation Method. IEEE Transactions on Geoscience and Remote Sensing, vol. 59, no. 11, pp. 9047-9056. doi: 10.1109/TGRS.2021.3053235

We politely request that you provide attribution to this work if you intend to use the code for published research by citing the paper above.

Set up your working directory structure as follows:

  • glacier_files/
    • Box001/
    • Box002/
    • BoxNNN/
  • LSaws/
    • Box001/
    • Box002/
    • BoxNNN/

Begin by obtaining or generating rectangular boxes over each glacier's terminus area as ESRI shapefiles. Name them BoxNAMEID.shp. These will be stored in your glacier_files folder (basepath variable). When the BoxID subfolders are generated automatically in the first two scripts, move the shapefiles into their respective folders. OPTIONAL: Repeat for each glacier's Randolph Glacier Inventory outline if available. Name them RGI_BoxNAMEID.shp.

The LSaws folder (downloadpath variable) will contain the Landsat images automatically downloaded in the first script.

Run the scripts in this order:

  1. LS_image_download_AWS.ipynb*
  2. preprocess.ipynb
  3. wtmm2d_terminuspick.ipynb (python only) OR wtmm2d_terminuspick_Xsmurf.ipynb (requires Xsmurf**)
  4. analyze_wtmm_results.ipynb

*The first script in this workflow automatically downloads subsets of Landsat 7 and 8 imagery available at low cost through the Amazon Web Services (AWS) s3 bucket. This requires a requester pays account through AWS. If you would like to input your own set of Landsat 7 and 8 images, skip the first script and start with preprocess.ipynb.

**Please contact [email protected] and [email protected] if you would like to install Xsmurf.

Each .ipynb file contains text describing the analysis in that step.

System requirements:

Requires GDAL version 3.2 or newer with command terminal functionality (e.g., gdalwarp, gdal_translate). Several steps require the ImageMagick command line software to be installed. If downloading images through AWS, the AWS command line interface must also be installed.

Other packages required are listed in the environment.yml file included. Set up a local conda environment with the .yml file. From the repository root, run in a terminal:

  • conda env create -f environment.yml

activate newly created environment:

  • conda activate autoterm_env

then start jupyter in browser

  • jupyter notebook &

automated-glacier-terminus's People

Contributors

jukesliu avatar phoebekinzelman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.