Skip to content

madelinemberger/sediment-ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sediment-ml

Nearshore image classification

Getting Started

  • Install poetry, a python package and virtual environment manager
    • On macOS, in the terminal, run the command brew install poetry (assuming homebrew is installed. If not, install homebrew)
    • General installation instructions: install poetry
  • Clone this repository by running git clone git@github.com:madelinemberger/sediment-ml.git or downloading the zip
  • Navigate into this repository
  • Run the command poetry install to set up the virtual environment for this repository

Running scripts

  • After setting up the environment with poetry (see Getting Started), you can run a script like this:
    • run the command poetry run python path/to/script.py

Running notebooks

  • After setting up the environment, you can launch Jupyter Notebook from within the environment like this:
    • run the command poetry run jupyter notebook

Script Information

This script does the following: Given a .tif file and a shapefile bundle with coastline information that spans the region of the .tif file, this script will

  • tile the .tif into NxN regions (default=512x512 pixels);
  • determine which of these regions intersect the coastline;
  • convert the intersecting regions to PNGs and save these files;
  • create a map image showing the intersecting tiles as PNGs and the coastline contour, along with the .tif boundary

Example output from this script can be seen in examples/coastline_tiles_plot.png and below:

Coastline-intersecting tiles highlighted

This script does the following: Given a .tif and a shapefile bundle with coastline information that spans the region of the .tif file, this script will

  • tile the .tif in NxN regions (default=512x512 pixels),
  • determine which of these regions intersect the coastline,
  • determine which of the regions adjacent to intersecting regions are not contained within the landmass,
  • convert the intersecting regions and adjacent, non-land regions to PNGs and save these files,
  • create a map image showing the intersecting tiles as red-boundary PNGs, the adjacent non-land tiles as orange-boundary PNGs, and the coastline contour as a blue line, along with the .tif boundary as a black line

Example output from this script can be seen in examples/coastline_tiles_plot_extended.png and below:

Coastline-intersecting tiles, and adjacent tiles, highlighted

About

Nearshore image classification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages