UDP 422 – GeoSpatial Analysis Exercise 9: Surface Analysis to Delineate a Basin 2/9/2016 Lab Exercise 9: Surface Analysis to Delineate a Basin Objectives Introduction to Digital Elevation Models (DEM) and surface analysis by delineating watershed basins. Setup 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. Background and Definitions 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: Diagram 1: Outline of steps to derive surface characteristics from a DEM http://resources.arcgis.com/en/help/main/10.2/index.html#//009z00000065000000 http://resources.arcgis.com/en/help/main/10.2/index.html#/How_Fill_works/009z00000061000000/ -1- UDP 422 – GeoSpatial Analysis Exercise 9: Surface Analysis to Delineate a Basin 2/9/2016 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 in ArcToolbox Help. Since you will be using ArcGIS Spatial Analyst to do this exercise, make sure that the Spatial Analyst extension is checked in Customize > Extensions. Directions 1. 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. 2. 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 3. In ArcToolbox open up the Flow direction tool (use search to find it). Select the input as seadem and the output grid as Flow_dir. Leave all optional fields blank. Press Ok. 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 32 64 128 determined by finding the direction of steepest descent, or maximum drop, from the center cell to each adjacent cell. This is 16 1 calculated as: 8 4 2 maximum drop = change in z (elevation) value / distance 4. However, notice that your output layer has a range of values Diagram 2: Cardinal from 1 to 255. This is because for cells that have an undefined Directions of Water flow 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. 5. 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. -2- UDP 422 – GeoSpatial Analysis Exercise 9: Surface Analysis to Delineate a Basin 2/9/2016 6. 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. Use the 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. 8. In ArcToolbox open the Fill tool. Enter seadem as the input grid, and seafill as the output grid. 9. 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. 10. In Raster Calculator type an equation that subtracts the seadem grid from the seafill grid. Call the output fillvalue. 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. 11. Use Search to find Hillshade. 12. 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. 13. Now create another hillshade raster, this time using the original seadem. 14. Switch back and forth between the original and the filled hillshade rasters. Pay particular attention to where and how the water is flowing out of Greenlake now that it has been filled. -3- UDP 422 – GeoSpatial Analysis Exercise 9: Surface Analysis to Delineate a Basin 2/9/2016 Flow Direction, again 15. Run the flow direction 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. 16. 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. 17. 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: will work just like the query builder in “Select by Attribute.” 18. 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! -4- . It UDP 422 – GeoSpatial Analysis Exercise 9: Surface Analysis to Delineate a Basin 2/9/2016 Deliverable Upload to Catalyst the following (in one Word or PDF, if you please!): 1. Answers to questions 1-3 2. Two pictures of your hillshade rasters 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? 3. A pretty map with: a. Roads, b. Your large basins (transparent, 50% is a good place to start), c. The filled hillshade layer as background (use default grayscale); and d. An appropriate title bar, legend, N arrow, scale. This exercise is due on March 6, 2014. -5-