Water Sheds and Stream Delineation
Water Sheds and Stream Delineation
Water Sheds and Stream Delineation
Purpose
The purpose of this exercise is to illustrate watershed and stream network delineation based on digital
elevation models using the Hydrology tools in the ArcGIS Geoprocessing toolbox. In this exercise, you
will perform drainage analysis on a terrain model for the San Marcos Basin. The Hydrology tools are
used to derive several data sets that collectively describe the drainage patterns of the basin.
Geoprocessing analysis is performed to recondition the digital elevation model and generate data on
flow direction, flow accumulation, streams, stream segments, and watersheds. These data are then be
used to develop a vector representation of catchments and drainage lines from selected points that can
then be used in network analysis. This exercise shows how detailed information on the connectivity of
the landscape and watersheds can be developed starting from raw digital elevation data, and that this
enriched information can be used to compute watershed attributes commonly used in hydrologic and
water resources analyses.
Learning objectives
Identify and properly execute the geoprocessing tools involved in DEM reconditioning.
Describe and quantitatively interpret the results from DEM reconditioning as a special case of
quantitative raster analysis.
Construct profiles using 3D Analyst.
Create and edit feature classes.
Identify and properly execute the sequence of Hydrology tools required to delineate streams,
catchments and watersheds from a DEM.
Evaluate and interpret drainage area, stream length and stream order properties from Terrain
Analysis results.
Develop a Geometric Network representation of the stream network from the products of
terrain analysis.
Use Network Analysis to select connected catchments and determine their properties
1
National Elevation Dataset and stream and watershed data from the National Hydrography Dataset
NHDPlus. If you want to do similar work in a different location, you will need to download similar data
from a known source in your country.
Data description:
WStrD.zip should be unzipped and saved in a folder where you will do your work. In this exercise, the
folder C:\Users\nmancipe\Desktop\WStrD has been used. The unzipped contents of WStrD.zip are
illustrated below:
Raster analyses such as watershed and stream network delineation are best performed in a consistent
projected spatial reference system (or projection). This is because calculation of slope, length and area
are involved and these are best done in linear (not geographic) units consistent with the elevation units.
In this exercise to expedite matters for you the data has all been projected into the NAD 1983 Texas
Centric Mapping System Albers.prj spatial reference.
In the SanMarcos geodatabase the BasemapAlbers feature dataset contains the four necessary feature
classes. Watershed is the set of HUC 12 watersheds within the San Marcos 8 digit HUC 12100203. Basin
is the San Marcos 8 digit HUC 12100203 boundary obtained by dissolving the HUC 12 watersheds.
Flowline is a subset of NHDPlus flowlines that cover the San Marcos Basin and surrounding area.
USGSGage is a set of USGS stream gages within the San Marcos Basin. There is also a raster smdem that
contains the digital elevation model for this region obtained from the National Elevation dataset at 30m
cell size appropriate for this analysis and has been projected to the NAD 1983 Texas Centric Mapping
System Albers spatial reference being used in this exercise.
The exercise is divided in to the following activities that each comprise a sequence of steps
2
1. DEM Reconditioning
2. Hydrologic Terrain Analysis
3. Network analysis
DEM Reconditioning
DEM reconditioning is a process of adjusting the DEM so that elevations direct drainage towards the
vector information on stream position, that in this case is the blue line stream features (Flowline)
obtained from NHDPlus. DEM reconditioning is only suggested when the vector stream information is
more reliable than the raster DEM information. This may not be the case here, but reconditioning is
done nevertheless to illustrate the process. DEM reconditioning as done here involves a sequence of
ArcGIS geoprocessing functions. The strategy is to first convert vector stream features to a raster
dataset of grid cells on the streams that has exactly the same dimensions (rows, columns, cell size) as
the DEM raster. This exposes you to a number of new geoprocessing tools (Feature to Raster, Greater
Than, Reclassify) as well as Environment Settings to control raster cell size, extent and snapping. Then
the Euclidean distance from each grid cell to the nearest stream is calculated and a Map Algebra
expression used to perform the reconditioning which involved lowering the elevation of all grid cells
along the streams by 20 units and grid cells near the streams by a value that tapers from 10 to 0 units
based on the distance from 0 out to 500 units. The results are then visualized using 3D Analyst. By
doing this you get some experience using the ArcGIS geoprocessing tools to derive new spatial data from
the original DEM and vector streams and a small glimpse into the powerful geospatial analytical
capability that these functions enable.
1. Feature to Raster.
Open ArcMap. Click on the icon to add data. In the dialog box, navigate to the location of the
data; select both the BasemapAlbers feature dataset and smdem raster containing the DEM for the San
Marcos and click on the “Add” button. The data provided will be added to the map display.
Click on the search icon on the standard toolbar to open the ArcGIS search window. Enter feature
to raster and click on the search magnifying glass. This is a way to find tools if you do not know which
toolbox they are in. You have to however know something about their name or a word used in
describing their functionality.
3
Click on the Feature to Raster tool. Select Flowline as the Input features. Use Field COMID (all we need
here is some unique number). For output raster designate the name FlowlineRaster in the
SanMarcos.gdb. Click on the Environments button.
In Environment Settings expand Output Coordinates and select Same as Layer "smdem". Expand
Processing Extent and select Extent same as "smdem" and Snap Raster as "smdem". Click OK
Notice that back on the Feature to Raster tool the output cell size now inherits the value 30 from the
snap raster. Click OK on the Feature to Raster tool.
4
The result is a FlowlineRaster that represents the flowlines as a raster with value corresponding to their
COMID. The particular field used was somewhat arbitrary as we really just need a value by which to
identify stream grid cells.
The result is a raster with value 1 for stream cells and no data elsewhere.
5
To use in calculations below, we need 0's not no data off the streams, so let's reclassify this. Locate the
Reclassify tool (using the search window) and enter the following input, click OK. (It does not matter
which of Reclassify (3D Analyst) or Reclassify (Spatial Analyst) tools you select. They are functionally the
same, just associated with different extension licenses)
The result is a raster where NoData values have been replaced by 0's.
3. Distance to streams
Search on distance and open the Euclidean Distance tool. Set Flowline as the input feature and
designate distance as the output raster in the SanMarcos.gdb.
Click on Environments and as before set Output Coordinates same as smdem and Processing Extent
same as smdem and Snap Raster to smdem.
6
The result is a grid giving distances to the streams that looks a bit like the inside of an intestine (sorry!).
7
The output is saved in a raster named smrecon (San Marcos reconditioned) in the SanMarcos.gdb. The
Map algebra expression is interpreted as follows:
5. 3D Analyst
Let's use Raster calculator and 3D Analyst to see what this has produced.
8
The worm like result shows how the DEM has been altered to reduce values along the streams.
9
Set the target layer in the toolbar to
smrecon and click on the interpolate
smde
smrec diff
Open the attribute table of FlowlineReclas and find the number of grid cells that were mapped as
stream cells. Given that the size of each grid cell is 30 m estimate the length of channels in the area
defined by the smdem grid as this number of cells times 30 m. Actually this is an over estimate
because FlowlineReclas approximates the Flowline feature class using a stair step approach.
10
Nevertheless the result is a rough estimate useful for cross checking. Use the total number of grid
cells in the FlowlineReclas raster dataset, and grid cell area to estimate the total area and take the
ratio to estimate the drainage density (Length of Channels/Total Area).
Answer: 241928 cells mapped as stream cells. This is over a total number of grid cells of
11581224+241928 = 11823152. (This could also have been obtained from number of rows and
columns 4334*2728). Assuming a length of each grid cell of 30 m (per the instructions), L = 241928 *
30 = 7.257 x 106 m.
Cell size is 30 m x 30 m = 900 m2.
Area = 11823152 * 900 = 10.64 x 109 m2
Drainage density = L/Area = 7.257 x 106 /10.64 x 109 = 0.000682 m-1 = 0.682 km-1.
Note. This is actually not a very good estimate. The Feature to Raster function identifies any grid
cell occupied be even a small length of flowline as on the raster, resulting in "fat" streams that
sometimes have a stair step pattern. The result when multiplied by cell size is an over-estimate.
This over-estimation could have been reduced if we had used the "Thin" tool.
Open the Layer Properties of the diff raster and find the average amount of "earth" removed by the
reconditioning process. Multiply this by the total area to get the total volume of "earth" removed. The
cross section of "earth" removed was a swath 1000 m wide along the streams with triangular cross
section (illustrated in a profile graph) going down to 10 m and a spike 30 m wide going down to 20 m.
Calculate the area of this cross section and multiply it by the length of channels to get another estimate
of the volume of "earth" removed by this reconditioning.
1. Volumes of earth removed estimated from (a) layer properties of diff and (b) from estimates of
channel length and cross section area. Comment on the differences.
a) The raster calculation smdem - smrecon was performed and the average of the resultant grid
is 2.779 m. This applies to a 900 m2 area, representing a removal volume of:
2.779 * 900 * 11823152 = 29.57 x 109 m3.
b) The cross section area of the swath removed during reconditioning is
11
1/2*1000 * 10 + 30 * 10 = 5300 m2.
Therefore volume removed is:
5300 * 7.257 x 106 = 38.46 x 109 m3.
1. Fill
This function fills the sinks in a grid. If cells with higher elevation surround a cell, the water is trapped in
that cell and cannot flow. The Fill function modifies the elevation value to eliminate these problems.
Select Spatial Analyst Tools Hydrology Fill. Set the input surface raster as smrecon and output
surface raster as fil in SanMarcos.gdb.
Press OK. Upon successful completion of the process, the “fil” layer is added to the map. This process
takes a few minutes.
In work to date we have specifically set the location of each output dataset. ArcGIS provides the
capability to set the location where geoprocessing data is saved by default, and this saves a little bit of
clicking in setting up the inputs. Let's do this. Click on Geoprocessing Environments on the main
menu.
12
Then expand Workspace and set the Current and Scratch Workspace to the geodatabase where you are
working.
2. Flow Direction
This function computes the flow direction for a given grid. The values in the cells of the flow direction
grid indicate the direction of the steepest descent from that cell.
13
Press OK. Upon successful completion of the process, the flow direction grid “fdr” is added to the map.
Make a screen capture of the attribute table of fdr and give an interpretation for the values in the Value
field using a sketch.
3. Flow Accumulation
This function computes the flow accumulation grid that contains the accumulated number of cells
upstream of a cell, for each cell in the input grid.
Press OK. Upon successful completion of the process, the flow accumulation grid “fac” is added to the
map. This process may take several minutes for a large grid, so take a break while it runs! Adjust the
symbology of the Flow Accumulation layer "fac" to a classified scale with multiplicatively increasing
breaks that you type in, to illustrate the increase of flow accumulation as one descends into the grid
flow network (100, 300, 1000, 3000, 10000, 30000, 100000, 3902832)
14
After applying this layer symbology you may right click on the "fac" layer and Save As Layer File
The saved Layer File may be imported to retrieve the symbology definition and apply it to other data.
Add the SanMarcos Basin feature class. This shows the outline of the San Marcos basin. Change the
symbology so that this is displayed as hollow and zoom in on the outlet in the South West corner. Use
the identify tool to determine the value of "fac" at the point where the main stream exits the area
defined by the San Marcos Basin polygon. This location is indicated in the following figure.
15
The value obtained represents the drainage area in number of 30 x 30 m grid cells. Calculate the
drainage area in km2. (Answer: The area of the San Marcos basin is 3911496 grid cells = 3911496 * 900 =
3. 520 x 109 m2 = 3520 km2)
Also examine the edges of the San Marcos Basin as represented by the Basin feature class. Note the
consistency between this basin boundary and streams as represented by flow accumulation. Notice also
how, apart from cutting off a number of meanders, there is generally good agreement between the
Flowline feature class and flow accumulation grid. This is a result of the DEM reconditioning that was
performed.
Add the SanMarcos Watershed feature class. This shows the outline of the HUC 12 subwatersheds in
the San Marcos basin. Change the symbology so that this is displayed as hollow and zoom in on the
outlet in the South West corner. Use the identify tool to find the HU_12_NAME of the subwatershed
right at the outlet of the San Marcos Basin.
16
Use the identify tool to determine the value of "fac" at the point where the main stream enters and
exits the area defined by this most downstream subwatershed. Subtract the entering fac value from the
exiting fac value to determine the area of this subwatershed. Compare your result to the area reported
in the ACRES and Shape_Area attributes of this feature. The Shape_Area attribute was calculated
automatically by ArcGIS when this feature class was created and is in the units consistent with the Linear
Unit of this feature class, meters in this case, so area is m2.
Answers: The name of most downstream HUC 12 subwatershed: Smith Creek-San Marcos River. Note
that this is within the Lower San Marcos HUC 10, but the HUC 12 name is Smith Creek-San Marcos.
Area draining in to most downstream HUC is: 3745870 grid cells = 3745870 * 900 = 3.371 x 10 9 m2.
Taking the difference with the area leaving this HUC 12 subwatershed, I get (3.520 - 3.371) x 109 m2=
0.149 x 109 m2 = 0.149 x 109 /4047 = 36820 acres. This compares well with the 36726 acres reported in
the ACRES attribute. The Shape_area for this subwatershed of 0.1486 x 109 m2, agrees with this.
17
Set the Name as Outlet and Type as Point Features. Click Next.
Leave the coordinate system as default (inheriting from the Feature Dataset it is going in to) and click
Next. Click Finish at the last screen without changing any of the fields.
Now let's use the Editor to create an outlet point in this feature class. Click on the Editor Toolbar button
on the standard toolbar to activate the Editor toolbar
Click on Editor Start Editing. Zoom right in on the outlet at the bottom right where flow
accumulation exits the area. Make sure that the outlet layer is turned on so that it appears in the Create
Features list. Using the Create Features button on the Editor Toolbar with Outlet clicked carefully place
a point at the desired outlet location
18
Click Editor Stop Editing. Respond Yes to the Save Edits prompt.
You should now have a new outlet point feature at your designated outlet.
Select Spatial Analyst Tools Hydrology Watershed. Set the inputs as follows and click OK.
The result should be a Watershed grid that has the value 1 over the area upstream from the outlet point
as evaluated from the flow direction field.
5. Stream Definition
Let's define streams based on a flow accumulation threshold within this watershed.
19
Select Spatial Analyst Tools Map Algebra Raster Calculator and enter the following expression,
using the name Str for the output raster.
The result is a raster representing the streams delineated over our watershed.
6. Stream Links
This function creates a grid of stream links (or segments) that have a unique identification. Either a link
may be a head link, or it may be defined as a link between two junctions. All the cells in a particular link
have the same grid code that is specific to that link.
Select Spatial Analyst Tools Hydrology Stream Link. Set the inputs as follows and click OK.
The result is a grid with unique values for each stream segment or link. Symbolize StrLnk with unique
values so you can see how each link has a separate value.
20
7. Catchments
The Watershed function also provides the capability to delineate catchments upstream of discrete links
in the stream network.
Select Spatial Analyst Tools Hydrology Watershed. Set the inputs as follows. Notice that the
Input raster pour point data is in this case the StrLnk grid. Click OK.
The result is a Catchments grid where the subcatchment area draining directly to each link is assigned a
unique value the same as the link it drains to. This allows a relational association between lines in the
StrLnk grid and Area's in the Catchments grid. Symbolize the Catchments grid with unique values so you
can see how each catchment has a separate value.
21
8. Conversion to Vector
Let's convert the raster representation of streams derived from the DEM to a vector representation.
Select Spatial Analyst Tools Hydrology Stream to Feature. Set the inputs as follows. Note that I
put the output in the BaseMapAlbers feature dataset.
Note here that we uncheck the Simplify polylines option. The simplification can cause streams to "cut
corners" that will result in errors when they are later on matched up with values an underlying stream
order grid during the process of determining stream order.
The result is a linear feature class "DrainageLine" that has a unique identifier associated with each link.
Select Conversion Tools From Raster Raster to Polygon. Set the inputs as follows
22
The result is a Polygon Feature Class of the catchments draining to each link. The feature classes
DrainageLine and CatchPoly represent the connectivity of flow in this watershed in vector form and will
be used later for some Network Analysis, that is enabled by having this data in vector form.
The result is a Raster StrahlerOrder that holds Strahler Order values for each grid cell. Let's now
associate these with the streams represented by DrainageLine.
Locate the Zonal Statistics as Table (Spatial Analyst) tool and run it with inputs as follows
23
Grid_code was chosen as the Zone field because there is a unique grid_code for each DrainageLine link.
The result is a Table "OrderTable".
Open the DrainageLine attribute table. Select Table Options Add Field. Specify the name
StrahlerOrder and leave other properties at their default. (Strahler Orders are small integer numbers
that should fit in a Short Integer data type)
Select Table Options Joins and Relates Join, then specify the Join data as follows
24
Respond No to the prompt about indexing.
The DrainageLine table now displays many more columns because it has included all the columns from
OrderTable. Which of these contains the Strahler Stream order that we need. It may initially be puzzling
as to why the MIN and MAX are different, because each link is supposed to have a single Strahler Order.
However, when you recognize that a link extends at its junction into the grid cell represented by the
downstream link, the reason becomes apparent. Right Click on the StrahlerOrder field header and select
Field Calculator, then double click on the OrderTable.MAJORITY field so that the Field Calculator displays
as follows and click OK.
25
The reason for doing this is that it can and does occur that a stream on a higher order grid flow path
"touches" the corner of a grid cell of lower order and the MIN statistic picks this up. The MAJORITY
statistic is more robust as it indicates the grid value of the majority of grid cells intersecting the flowline.
The following figure illustrates the specific problem.
If you check the OrderTable attribute table you will notice that it has only 433 records whereas the
DrainageLine has 434 records. It means that the Zonal Statistics as Table function somehow omitted one
of the stream links. [I believe that this is a bug in the software]. This results in one of the links not
having StrahlerOrder evaluated. By selecting this link you can see where it is.
Therefore, you need to edit the StrahlerOrder value for this link to be 1. [Note that it is unfortunately
not uncommon to encounter problems and bugs like this in complicated software. As a user it is
important to be vigilant to the possible occurrence of this and always be cross-checking results.
Learning how to do this, discover a problem and work around it is an important skill to learn].
Symbolize the DrainageLine feature class using Strahler Stream Order for color and line width.
26
10. Stream Gauge Subwatersheds
It is often necessary to delineate watersheds draining to specific monitoring points on the stream
network, such as stream gages. Let's do this. If necessary add the USGSGage feature class. This is a
stream gauge feature class similar to that used in previous exercises. Zoom in close to one of the gages.
You will see that although close, the gages do not lie exactly on the streams.
Use Spatial Analyst Tools Hydrology Snap Pour Point with the following input
This results in a raster of pour points close to each gage but on the stream as defined by flow
accumulation.
Use Spatial Analyst Tools Hydrology Watershed with the following input
This results in subwatersheds delineated to each stream gage. These may be used with zonal functions
to evaluate properties of the subwatersheds draining to these gauges.
27
Indicate the field in the gages table that is associated with values in the wshedG. Give the area in
number of grid cells and km2 of each gauge subwatershed. Add these as appropriate to give the total
area draining to each gauge and compare to the DA_SQ_MILE values from the USGS for these gauges.
(Answer available at the following table)
ObjID's of all
DA_SQ_ SubWshedA upstream Watershed
SITE_NO STATION_NM MILE Count rea(mi2) Color (inclusive) Area (mi2) Difference
08171000 Blanco Rv at Wimberley, TX 355 1022117 355.18 Beige 1 355.18 -0.18
08171300 Blanco Rv nr Kyle, TX 412 164930 57.31 Green 1,2 412.49 -0.49
08170500 San Marcos Rv at San Marcos, TX 48.9 141649 49.22 Dark blue 3 49.22 -0.32
08172400 Plum Ck at Lockhart, TX 112 319408 110.99 Orange 4 110.99 1.01
08172500 Plum Ck nr Lockhart, TX 189 211916 73.64 Light blue 4,5 184.63 4.37
08173000 Plum Ck nr Luling, TX 309 366431 127.33 Crimson 4,5,6 311.96 -2.96
08172000 San Marcos Rv at Luling, TX 838 1087003 377.72 Med blue 1,2,3,7 839.44 -1.44
08173500 San Marcos Rv at Ottine, TX 1249 309029 107.39 Brown 1,2,3,4,5,6,7,8 1258.78 -9.78
Network Analysis
Some of the real power of GIS comes through its use for Network Analysis. A Geometric Network is an
ArcGIS data structure that facilitates the identification of upstream and downstream connectivity. Here
we step through the process of creating a geometric network from the vector stream network
representation obtained above, and then use it to determine some simple aggregate information.
Locate the Feature Vertices to Points tool (using the search window) and run it with the following input.
28
This creates vertices at each "dangling" end of the stream network. This was done so as to be able to
identify the vertex that is the outlet to set as a sink in the Geometric Network creation procedure, so
that flow direction can be determined.
Zoom in on the bottom right and select the vertex that is right at the outlet. Use the Select Features
Right click on DrainageLineSourceSink Data Export Data and save the selected point as OutletSink.
Now open the Catalog window and right click on BaseMapAlbers New Geometric Network
Click Next on the New Geometric Network screen. Enter the name SanMarcosNet, then click Next.
29
Select the features DrainageLine and OutletSink. These will be used to create a Geometric Network.
Click Next.
At the prompt to Select roles for the network feature class switch the role under Sources and Sinks for
OutletSink to Yes. This will be used as a Sink for the network. This is a location that receives flow. Click
Next.
30
Do not add any weights at the prompt about weights, just click Next. Click Finish at the summary
prompt. The result is a Geometric Network SanMarcosNet that can be used to perform network
operations
Select Customize Toolbars Utility Network Analyst from the main menu to activate the Utility
Network Analyst toolbar
The result is a set of black dots on each network link. These indicate that flow direction for the network
is not assigned.
31
To assign network flow direction the OutletSink needs to have a property called AncillaryRole set to be
the encoding for Sink.
Open the Editor toolbar and select Start Editing (Click Continue at the warning). Use the Editor Edit Tool
to select the point at the outlet in the OutletSink Feature Class for editing.
Click on the Attributes button on the Editor Toolbar to open the attributes display panel.
The panel should show that the AncillaryRole for this point is "None".
32
Open the attribute table for OutletSink and edit the encoding for the Field AncillaryRole from 0 to 2.
When you make this change you should see the Ancillary Role designation switch from None to Sink.
Click on the Set Flow Direction Tool on the Utility Network Analysts toolbar.
You should see the black dots switch to arrows indicating that Flow in the network is now set towards
the designated Sink at the outlet. This network is now ready for Analysis. Stop Editing, saving edits.
33
Zoom to the vicinity of one of the USGS stream gauges and place an edge flag near the gauge using the
Utility Network Analyst Add Edge Flag Tool.
The result is a highlighting of the link that has the edge flag and all links upstream.
Switch the Results format to Selection. Select Analysis Clear Results and run the trace again.
34
Now the upstream features are selected. Open the Drainage Line feature class attribute table and show
selected records
35
Record the total length and number of stream links upstream of each USGS gauge. Note that there is a
small error in these results due to the gauge being part of the way along the flagged link which is
included in the calculations. The link could be split to make this analysis more precise but that will not
be done here (it would add another 5 pages and few hours to this already long exercise). Switch the
Trace Task to Trace Downstream and press Solve again. Notice how the selected stream links switch to
those downstream from the flag. Determine the total length of these links as an estimate of the
distance along the rivers from each gauge to the downstream outlet. Join the CatchPoly attribute table
to the DrainageLine table. This provides access to the area draining directly to each stream link.
Evaluate the total area upstream of each using Shape_Area Statistics. You can also, by placing a flag
at an upstream link determine the flow path (and its length) from any distant link to the outlet. Evaluate
the length of the longest flow path by choosing a link that appears to have the longest flow path (a bit of
trial and error may be necessary). Prepare a layout that illustrates the longest flow path in the San
Marcos watershed.
36
A table giving for each USGS gauge the number of upstream stream links, the total length of upstream
stream links, the total upstream area, drainage density (total length/total area), number of downstream
links along path to outlet, distance to outlet along the streams. (Answer in the following table)
Note that length and area results are over-estimates relative to the USGS gauge because the network
trace includes the entire link including the gauge.
A layout illustrating the longest flow path in the San Marcos watershed and giving the length in km.
37