Skip to content

Extract valley floors from digital elevation models

License

Notifications You must be signed in to change notification settings

avkoehl/valleyx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Valleyx

valleyx is a python package for extracting valley floors from digital elevation models.

Combines two approaches:

  1. low slope areas connected to the flowlines
  2. elevation above stream thresholding

map of extracted valley floor

Installation

Prerequisites

Installing from Github

  1. Clone the repository
git clone git@github.com:avkoehl/valleyx.git
cd valleyx
  1. Install dependencies using Poetry
poetry install

Optionally install with additional development dependencies including matplotlib and jupyter

poetry install --with dev

Usage

Basic Usage

Import and use the modules in your python code:

import rioxarray as rxr
import geopandas as gpd

from valleyx import ValleyConfig
from valleyx import extract_valleys

dem = rxr.open_rasterio('path/to/dem.tif')
flowlines = gpd.read_file('path/to/flowlines.shp')
config = ValleyConfig()

floors, flowlines = extract_valleys(dem, flowlines, config)

Configuration Options

To customize parameters, create a ValleyConfig object and modify the parameters:

config = ValleyConfig()
config.reach.hand_threshold = 5

For more information on the parameters:

help(ValleyConfig)

Contact

Arthur Koehl
avkoehl at ucdavis .edu

About

Extract valley floors from digital elevation models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages