UDP 422 – GeoSpatial Analysis
Exercise 9: Surface Analysis to Delineate a Basin11/16/2018
Lab Exercise 9: Surface Analysis to Delineate a Basin
Introduction to Digital Elevation Models (DEM) and surface analysis by delineating watershed basins.
Data can be found within the zip file exc9 from the website
Note: Make sure that you place the files in a directory with a name that is less than 8 characters long.
Files include:
1. SeaDEM.e00: A 10 meter Digital Elevation Mode (DEM)grid for Seattle. (this is an Interchange File, you have to use “import from interchange file” to convert to grid, see exercise 1)
2. Rdutm83.shp: A vector line shapefile with roads for Seattle.
Note: both files are projected to UTM NAD 83.
You will explore a digital elevation model for the city of Seattle by analyzing the direction of water flow and observing the existence of sinks in DEMs. You will then fill the sinks and delineate watershed basins. For a helpful flow chart of this process see Diagram 1.
When delineating watersheds based on a DEM, it is important to understand the data you are working with and identify any errors or potential problems with it. Therefore, delineating basins is an iterative process involving the identification of errors in the form of sinks and peaks and correcting for those errors before calculating the direction of water and basin delineation.Sinks are cells that are (erroneously) lower than their surroundings so that the flow direction can’t be determined. Peaks are the opposite, cells that are erroneously higher than their surroundings.
For more info about watersheds, sinks, peaks, and filling see:
You will be using mostly ArcToolbox and Raster Calculator in Spatial Analyst to complete the analysis. It will be helpful to read up on these processes inArcToolboxHelp.
Since you will be using ArcGIS Spatial Analyst to do this exercise, make sure that the Spatial Analyst extension is checked in CustomizeExtensions.
- Add the SeaDEM GRID file and Rdutm83 file into a new map. The Digital Elevation Model has a resolution of 10 meters. Therefore each pixel with an elevation value is 10 x 10 meters.
- Set your Geoprocessing environments for the analysis (see Ex 8 for a refresher on this).
The goal of this exercise is to delineate watershed basins based on the digital elevation model. In order to do this, we first need to identify the direction of the water flow. We will create the flow direction, view the output, and then run sinks on the flow direction map.
Flow Direction, Sinks and Fills
- In ArcToolbox open up the Flow direction tool (use searchto find it). Select the input as seadem and the output grid as Flow_dir. Leave all optional fields blank. Press Ok.
32 / 64 / 128
16 / 1
8 / 4 / 2
The output will automatically display the Flow_dir output. Examine the results. The flow direction is made up of categorical data with values that increase exponentially from 1 to 128. Each value represents a cardinal direction indicating the direction of water flow (see diagram 2). The direction of flow is determined by finding the direction of steepest descent, or maximum drop, from the center cell to each adjacent cell. This is calculated as:
maximum drop = change in z (elevation) value / distance
- However, notice that your outputlayer has a range of values from 1 to 255. This is becausefor cells that have an undefined flow direction, the value for that cell in the output flow direction grid will be 255, the sum of the 8 cardinal values. In our case, the undefined cells are caused by sinks. A sink is a cell or set of spatially connected cells whose neighboring cells are all higher than the center cell, making it impossible for Arc to calculate a drop. For more information, read up on sinks in the help system.
- You will use the Flow_dir grid to identify sinks. In ArcToolbox open up the Sink tool, and select Flow_dir as your input, and sinks as your output grid.
- This grid displays all the different sinks it found in your DEM. Find Greenlake and notice that it has been identified as a sink. Zoom into this area. Usethe identify tool to see the gridcell value, which now represents a unique id for that sink.
Q1. How many sinks are identified in total? What is the unique sink value of Greenlake?
Filling sinks can be a lengthy iterative process where you pour points for each sink and set new elevation values for the sink. This will allow the identification of flow direction for these areas. ArcToolbox, however has a quick way of identifying and filling sinks for us. It determines the elevation based on the lowest value it can find around the edge of the sink. Let’s take this route.
- In ArcToolbox open the Fill tool. Enter seadem as the input grid, and seafill as the output grid.
- In ArcMap notice how the seafill grid has the same range of values as the original DEM.
To visualize the change in elevation between the original and the filled DEM we will subtract the filled DEM by the original.
- In Raster Calculator type an equation that subtracts the seadem grid from the seafill grid. Call the outputfillvalue.
Q2. What is the largest change in elevation for Greenlake between Seafill and the original DEM? How many cells TOTAL(not just at Greenlake) have this value?
Hillshade:
A hillshade is a function typically used to create a shaded relief map from an elevation grid. We will use it here to visually observe the change in elevation between the original DEM and the filled DEM. This helps us understand the kind of manipulation and changes we are making to our data when we choose to fill the sinks.
- Use Search to findHillshade.
- Select seafill as the input surface to which you want to calculate hillshade (remember, seafill is the corrected DEM with the sinks filled in). Use the default azimuth (angular direction of the sun) and altitude (the slope or angle of the illumination source above the horizon. Keep the Z factor as 1. Specify an output raster. Click OK.
- Now create another hillshade raster, this time using the original seadem.
- Switch back and forth between the original and the filledhillshaderasters. Pay particular attention to where and how the water is flowing out of Greenlake now that it has been filled.
Flow Direction, again
- Run the flowdirection again, except this time use the filled DEM. Call the output raster flow_dir2. Display the results and notice the range of values. Also notice the "behavior" of the flow direction map and the values now over the filled sink areas. The flow direction command has rules for operating on flat surfaces. Now we are ready to run the basin delineation on the flow direction grid flow_dir2.
Basin Delineation
The Basin function delineates drainage basins within the analysis window by identifying ridge lines between basins. Basin analyzes the flow-direction grid to find all sets of connected cells that belong to the same drainage basin. The drainage basins are created by locating the pour points at the edges of the analysis window (where water would pour out of the grid), as well as sinks, then identifying the contributing area above each pour point. This results in a grid of drainage basins.
- In ArcToolbox open the tool for Basin. Set the output file as seabasin.
If you change the symbology to be many different colors (rather than a gradient) you will see that the majority of the basins are actually small slivers that offshoot directly into the water, these are not real basins, but are errors created by having an edge to our data. This is an artifact of how flow direction deals with edges. We could create a mask to remove these basins (which are on top of surface water). Instead we will simply choose the basins larger than 1,000 acres.
Q3. How many basins were delineated originally? How many are larger than 1,000 acres?
Extracting Raster Data
Now we want to extract the basins larger than 1000 acres so we can map them. However, extracting a subset of raster data is fundamentally different than exporting vector data. We need to use a special tool (only available in spatial analyst), since using the Select by Attribute > Export Data (selected) doesn’t work with rasters. The Extract by Attribute tool in Spatial Analyst allows us to extract raster cells based on a query (see the help for more info). There are also other ways to extract raster data, including Extract by Circle/Rectangle, etc.
- Open the “Extract by Attribute” tool, use your basins layer as the input raster, and an appropriate ‘Where’ clause that will select only the basins larger than 1000 acres. There is a SQL query builder accessible by clicking the little box on the right: . It will work just like the query builder in “Select by Attribute.”
- Select a name for your output raster, and hit OK.
You should now have a raster layer containing only the basins larger than 1000 acres!
Upload to Catalyst the following (in one Word or PDF, if you please!):
- Answers to questions 1-3
- Two pictures of your hillshaderasters focused on Greenlake, one of the original DEM derived hillshade raster and one of the filled hillshade raster. Where do you see the largest change due to the fill performed in ArcGIS?
- A pretty map with:
- Roads,
- Your large basins (transparent, 50% is a good place to start),
- The filled hillshadelayer as background (use default grayscale); and
- An appropriate title bar, legend, N arrow, scale.
This exercise is due on March 6, 2014.
- 1 -