Skip to content

Commit 8b39314

Browse files
committed
Updating floodplain and terrace documentation
1 parent 32f19e8 commit 8b39314

12 files changed

+510
-3
lines changed

LSDTT_docs.asc

+1-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ include::book/BasinwideCRN/BasinwideCRN.asc[]
3737

3838
include::book/Swath-Profiling/Swath-Profiling.asc[]
3939

40-
include::book/Floodplain-Delineation/floodplain-delineation.asc[]
41-
42-
include::book/Terrace-Extraction/terrace-extraction.asc[]
40+
include::book/Floodplain-Terrace-Extraction/floodplain-terrace-extraction.asc[]
4341

4442
include::book/Drainage-Density/drainage-density.asc[]
4543

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
== Floodplain and terrace extraction using channel relief and slope thresholds
2+
3+
image::images/Le_Sueur_terraces.png[, 1000, 600, align='center']
4+
5+
IMPORTANT: These tools have extra dependencies in addition to a standard installation of LSDTopoTools. Make sure you have read the <<Requirements for swaths and point clouds,requirements overview>> section and installed the libraries needed to run these tools. Detailed installation information is also found in the <<The Swath and Point Cloud tools, appendix>>.
6+
7+
This chapter outlines a method of extracting floodplains and terraces across the landscape based on thresholds of local gradient and elevation compared to the nearest channel. These thresholds are calculated statistically from the DEM using quantile-quantile plots, and do not need to be set manually by the user for the lansdcape in question. For more details on the methodology please refer to Clubb et al. (in prep).
8+
9+
Floodplains are extracted across the whole DEM using thresholds of local gradient and relief relative to the nearest identified channel pixel. Terraces are extracted along a channel swath profile using an algorithm developed by http://www.earth-surf-dynam-discuss.net/1/387/2013/esurfd-1-387-2013.html[Hergarten et al. (2014)]. The user needs to provide a CSV file with a pair of latitude and longitude coordinates. The code will extract the channel network between these coordinates and identify all terraces along this baseline channel.
10+
11+
=== The methodology
12+
13+
The method has several steps, which are outlined below:
14+
15+
. The DEM is filtered using a Perona-Malik filter, a non-linear filter. For more details please refer to http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=56205[Perona and Malik (1990)]. This filter was chosen as it reduces micro-topographic noise while preserving sharp boundaries, such as between hillslopes and floodplains.
16+
. After filtering, the local slope and relief relative to the nearest channel are calculated for each pixel. To calculate the relief relative to the channel, a threshold stream order must be set to ensure that small first order tributaries are not selected. If identifying terraces, relief is calculated based on a swath profile rather than on the nearest channel.
17+
. Thresholds for slope and channel relief are calculated statistically from the DEM using quantile-quantile plots. This involves plotting the probability density function of each metric and calculating the deviation away from a reference normal distribution.
18+
. Any pixel with a value lower than both the channel relief and slope threshold is then classified as floodplain or terrace, giving a binary mask of 1 (floodplain/terrace) and 0 (not floodplain/terrace).
19+
. Floodplains and terraces are separated using a connected components algorithm (http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4472694[He et al. (2008)]). Any patches which are connected to the channel network are identified as floodplain. The user can also specify a minimum height of the terraces above the modern channel. The connected components algorithm also assigns a unique ID to each floodplain/terrace.
20+
. The user can specify various topographic metrics to calculate for each patch of floodplain or terrace, such as elevation compared to the channel.
21+
22+
23+
WARNING: This method is in development. We cannot guarantee a bug-free experience!
24+
25+
.Quick guide if you already know what you are doing
26+
*****************************************************************************
27+
28+
Here is a quick overview of how to set up and run the code, if you have done it before:
29+
30+
. Choose the channel extraction method that you would like to use.
31+
. Make sure your DEM is in `bil` format and is in the repository folder
32+
. Create a parameter file for your DEM
33+
. Make sure you have created a channel network for your DEM, and have the `csv` file in your repository.
34+
. If you want the floodplains, compile the code with `make -f get_floodplains.make`, and run the code with `./get_floodplains.out /path_to_data_folder/ parameter_file.param`
35+
. If you want the terraces, make sure you have the CSV file with the swath coordinate points in your repository. Compile the code using the compile script `bash get_terraces.sh` and run the program with `./terraces_swath_driver.out /path_to_data_folder/ parameter_file.param`
36+
. Open the resulting `bil` files in the GIS of your choice.
37+
*****************************************************************************
38+
39+
include::sections/get-the-code.asc[]
40+
41+
include::sections/preliminary-steps.asc[]
42+
43+
include::sections/floodplain-tutorial.asc[]
44+
45+
include::sections/terrace-tutorial.asc[]
Loading
Loading
Loading
Loading
Loading
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
=== Floodplains
2+
3+
This section explains how to extract floodplains across the DEM. We have provided some example datasets which you can use in order to test the floodplain extraction. If you are using the vagrant distribution, we recommend that you create a new directory in the `Topographic_projects` directory for each field site that you analyse. Navigate to the `Topographic_projects` directory using the `cd` command:
4+
5+
[source,console]
6+
----
7+
$ pwd
8+
/LSDTopoTools/Git_projects/
9+
$ cd ..
10+
$ cd Topographic_projects/
11+
----
12+
13+
In this tutorial we will work using a LiDAR dataset from Mid Bailey Run, Ohio. You should make a new directory for the Mid Bailey Run DEM in the `Topographic_projects` directory:
14+
15+
[source,console]
16+
----
17+
$ mkdir Mid_Bailey_Run/
18+
$ cd Mid_Bailey_Run/
19+
----
20+
21+
You can get the DEM for Mid Bailey Run from our ExampleTopoDatasets repository using `wget`:
22+
23+
[source,console]
24+
----
25+
$ wget https://github.com/LSDtopotools/ExampleTopoDatasets/raw/master/Bailey_DEM.bil
26+
$ wget https://github.com/LSDtopotools/ExampleTopoDatasets/raw/master/Bailey_DEM.hdr
27+
----
28+
29+
This dataset is already in the preferred format for use with LSDTopoTools (the ENVI `bil` format). The figure below shows a shaded relief map of part of the South Fork Eel River DEM which will be used in these examples.
30+
31+
.Shaded relief image of Mid Bailey Run, OH, USA, UTM Zone 17N
32+
image::images/Bailey_map.png[Shaded relief map of Mid Bailey Run, Ohio, 500, 600, align='center']
33+
34+
==== Get the example parameter files
35+
36+
We have also provided some examples parameter files that are used to run the floodplain delineation. You can get the example floodplain driver using `wget`:
37+
38+
[source,console]
39+
----
40+
$ wget https://github.com/LSDtopotools/ExampleTopoDatasets/tree/master/example_parameter_files/ExampleFiles_FloodplainTerraceExtraction/LSDTT_floodplains.param
41+
----
42+
This should be placed in the same folder as your DEM and the channel heads `csv` file. The example from Mid Bailey Run is called `LSDTT_floodplains.param` and should look like this:
43+
44+
[source,paramfile]
45+
----
46+
# This is a driver file for LSDTopoTools
47+
# Any lines with the # symbol in the first row will be ignored
48+
49+
# File information
50+
dem read extension: bil
51+
dem write extension: bil
52+
read path: /LSDTopoTools/Topographic_projects/Mid_Bailey_Run/
53+
read fname: Bailey_DEM
54+
write fname: Bailey_DEM
55+
CHeads_file: Bailey_DEM_Wsources
56+
57+
# Parameters for floodplain extraction
58+
Filter topography: true
59+
Min slope filling: 0.0001
60+
surface_fitting_window_radius: 6
61+
Threshold_SO: 3
62+
Relief lower percentile: 25
63+
Relief upper percentile: 75
64+
Slope lower percentile: 25
65+
Slope upper percentile: 75
66+
QQ threshold: 0.005
67+
Min patch size: 1000
68+
----
69+
You can run the analysis on the Mid Bailey Run DEM using the example parameter file, and modify it as you wish for your own DEM.
70+
71+
WARNING: You must make sure the description of the parameter in your file matches EXACTLY to the example, or the code will not recognise the parameter properly. If in doubt, check your spelling.
72+
73+
The table below explains the function of each of these parameters:
74+
75+
[cols="1,1,2", options="header"]
76+
.Explanation of the parameters used for terrace extraction
77+
|===
78+
|Parameter name
79+
|Data type
80+
|Description
81+
82+
|dem read extension
83+
|String
84+
|The file extension of your input DEM
85+
86+
|dem write extension
87+
|String
88+
|The file extension of the output rasters
89+
90+
|read path
91+
|String
92+
|The path to your DEM and parameter file
93+
94+
|read fname
95+
|String
96+
|The name of your DEM *without extension*
97+
98+
|CHeads_file
99+
|String
100+
|The name of the channel heads csv file *without extension*
101+
102+
|Filter topography
103+
|Boolean
104+
|Switch to run the filtering and filling of the DEM. Only set to false if you want to re-run the analysis (to save time).
105+
106+
|Min slope filling
107+
|float
108+
|Minimum slope for filling the DEM, suggested to be 0.0001
109+
110+
|surface_fitting_window_radius
111+
|float
112+
|Window radius for calculating slope, should be calculated using the window size routines
113+
114+
|Threshold_SO
115+
|integer
116+
|Threshold Strahler stream order for the nearest channel. A value of 3 should work in most landscapes.
117+
118+
|Relief lower percentile
119+
|integer
120+
|Lower percentile for fitting Gaussian distribution to relief from quantile-quantile . Leave as 25 unless you have a weird quantile-quantile plot for the landscape.
121+
122+
|Relief upper percentile
123+
|integer
124+
|Upper percentile for fitting Gaussian distribution to relief from quantile-quantile plots. Leave as 75 unless you have a weird quantile-quantile plot for the landscape.
125+
126+
|Slope lower percentile
127+
|integer
128+
|Lower percentile for fitting Gaussian distribution to slope from quantile-quantile plots. Leave as 25 unless you have a weird quantile-quantile plot for the landscape.
129+
130+
|Slope upper percentile
131+
|integer
132+
|Upper percentile for fitting Gaussian distribution to rslope from quantile-quantile plots. Leave as 75 unless you have a weird quantile-quantile plot for the landscape.
133+
134+
|QQ threshold
135+
|float
136+
|Threshold for calculating difference between the real and Gaussian distributions from the quantile-quantile plots. Leave as 0.005 unless you have a weird quantile-quantile plot for the landscape.
137+
138+
|Min patch size
139+
|integer
140+
|Minimum number of pixels for each floodplain patch, can use to remove very small patches which may be due to noise.
141+
142+
|===
143+
144+
==== Compiling the code
145+
146+
Before the code can be run, you must compile it. To do this you need to go to the `driver_functions_Floodplains-Terraces` directory in the folder `LSDTopoTools_FloodplainTerraceExtraction`. Navigate to the folder using the command:
147+
148+
[source,console]
149+
----
150+
$ cd /LSDTopoTools/Git_projects/LSDTopoTools_FloodplainTerraceExtraction/driver_functions_Floodplains-Terraces/
151+
----
152+
153+
and compile the code with:
154+
155+
[source,console]
156+
----
157+
$ make -f get_floodplains.make
158+
----
159+
160+
This may come up with some warnings, but should create the file `get_floodplains.out`. You can then run the program with:
161+
162+
[source,console]
163+
----
164+
$ ./get_floodplains.out /path/to/DEM/location/ name_of_parameter_file.param
165+
----
166+
167+
For our example, the command would be:
168+
169+
[source,console]
170+
----
171+
$ ./get_floodplains.out /LSDTopoTools/Topographic_projects/Eel_River/ LSDTT_floodplains.param
172+
----
173+
174+
The program should take between 10 - 40 minutes to run, depending on the size of your DEM and your processing power. Once it is completed, you will have a number of `bil` files which you can open in a GIS of your choice. These files will include:
175+
176+
. *DEM_name_filtered.bil and .hdr*: The original DEM after Perona-Malik filtering
177+
. *DEM_name_channel_relief.bil and .hdr*: A raster of elevations compared to the nearest channel
178+
. *DEM_name_slope.bil and .hdr*: A raster of local gradient
179+
. *DEM_name_qq_relief.txt and _qq_slope.txt*: Text files with the quantile-quantile plot information. This can be plotted in our python script to check whether the thresholds selected were appropriate.
180+
. *DEM_name_FP.bil and .hdr*: A raster of floodplain locations.
181+
182+
An example of the floodplains extracted from the Mid Bailey Run catchment is shown below. You should be able to get a raster similar to this by opening the file `Bailey_DEM_FP.bil` in a GIS of your choice.
183+
184+
.Floodplains extracted for the Mid Bailey Run catchment, Ohio.
185+
image::images/Bailey_FP.png[Mid Bailey Run floodplains, align='center']
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
=== Get the code for floodplain and terrace extraction
2+
3+
The code for floodplain/terrace extraction can be found in our GitHub repository. This repository contains code for identifying floodplains based on relief relative to the nearest channel, and getting terraces along a channel swath profile.
4+
5+
==== Clone the GitHub repository
6+
7+
First navigate to the folder where you will keep the GitHub repository. If you installed LSDTopoTools using the vagrant distribution, then this should be the `Git_projects` folder. To navigate to this folder in a UNIX terminal use the `cd` command:
8+
9+
[source,console]
10+
----
11+
$ cd /LSDTopoTools/Git_projects
12+
----
13+
14+
You can use the command `pwd` to check you are in the right folder. Once you are in this folder, you can clone the repository from the https://github.com[GitHub website]:
15+
16+
[source,console]
17+
----
18+
$ pwd
19+
/LSDTopoTools/Git_projects/
20+
$ git clone https://github.com/LSDtopotools/LSDTopoTools_FloodplainTerraceExtraction.git
21+
----
22+
==== Alternatively, get the zipped code
23+
24+
If you don't want to use _git_, you can download a zipped version of the code:
25+
26+
[source,console]
27+
----
28+
$ pwd
29+
/LSDTopoTools/Git_projects/
30+
$ wget https://github.com/LSDtopotools/LSDTopoTools_FloodplainTerraceExtraction/archive/master.zip
31+
$ gunzip master.zip
32+
----
33+
34+
NOTE: https://github.com[GitHub] zips all repositories into a file called `master.zip`,
35+
so if you previously downloaded a zipper repository this will overwrite it.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
=== Preliminary steps
2+
3+
==== Getting the channel head file
4+
5+
Before the floodplain/terrace extraction algorithm can be run, you must create a channel network for your DEM. This can be done using the <<Channel extraction>> algorithms within LSDTopoTools. There are several channel extraction algorithms which you can choose from: for more details please refer to the <<Channel extraction>> section. Once you have run the channel extraction algorithm, you must make sure that the `csv` file with the channel head locations is placed in the same folder as your DEM.
6+
7+
==== Finding the correct window size
8+
9+
Before we can run the floodplain/terrace extraction algorithm, we need to calculate the correct window size for calculating slope across the DEM. This is used to calculate the thresholds for floodplain/terrace identification. Please refer to the <<Selecting A Window Size>> section for information on how to calculate a window size for your DEM. We suggest a value of around 6 m for 1 m resolution DEMs, and a value of 15 m for 10 m resoluton DEMs.

0 commit comments

Comments
 (0)