An open API service indexing awesome lists of open source software.

https://github.com/giswqs/dem-depression-level-set-method

Delineating nested hierarchy of topographic depressions in digital elevation models (DEMs) using level set methods
https://github.com/giswqs/dem-depression-level-set-method

dems digital-elevation-model gis lidar python topographic-depressions

Last synced: about 1 year ago
JSON representation

Delineating nested hierarchy of topographic depressions in digital elevation models (DEMs) using level set methods

Awesome Lists containing this project

README

          

# Level Set Methods
This repo was created for the following peer-reviewed manuscript:

**Wu, Q.**, Lane, C.R., Wang, L., Vanderhoof, M.K., Christensen, J.R., & Liu, H. (2018). Efficient Delineation of Nested Depression Hierarchy in Digital Elevation Models for Hydrological Analysis Using Level-Set Methods. *Journal of the American Water Resources Association* (under review)

## How to use the level set algorithm

This tutorial assumes that you have used conda before. Please follow the [conda user guide](https://conda.io/docs/user-guide/install/index.html) to install conda if necessary.

### Step 1: Creating a conda environment
Please create an environment from the provided [environment.yml](environment.yml) file using the following command:

`conda env create -f environment.yml`

The command above will create a conda environment named `levelset`. If you want to remove the levelset conda environment, use the following command:

`conda remove --name levelset --all`

## Step 2: Setting Python interpreter
Clone this repo and create a PyCharm project using the repo folder. Set the Python interpreter to your conda env path (e.g., `~/anaconda3/envs/levelset/bin/python`)

## Step 3: Setting algorithm parameters
Open the Python script [level_set/slicing.py](level_set/slicing.py) and change the following parameters if needed.

# set input files
in_dem = "../data/CLSA_LiDAR.tif"
in_sink = "../data/CLSA_Sink.tif"

# parameters for level set method
min_size = 2000 # minimum number of pixels as a depression
min_depth = 0.3 # minimum depression depth
interval = 0.2 # slicing interval, top-down approach

# set output directory
out_dir = "../result"

## Step 4: Executing the algorithm
Run the Python script [level_set/slicing.py](level_set/slicing.py). By default, results will be saved under the `result` folder under the project root directory.

## Examples
The images below show working examples of the level set method for delineating nested depressions in the Cottonwood Lake Study Area (CLSA), North Dakota.
More test datasets (e.g., the Pipestem watershed in the Prairie Pothole Region of North Dakota) can be downloaded from

The following example was conducted on a 64-bit Linux machine with a quad-core Intel i7-7700 CPU and 16 GB RAM. The average running time of the algorithm for this DEM was 0.75 seconds.

![CLSA DEM](/figures/CLSA_DEM.png)

![CLSA Result](/figures/CLSA_Result.png)

![CLSA Table](/figures/CLSA_Table.png)