Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this lab, you will be learning a variety of geoprocessing tools, with a focus on those within the Hydrology toolset. You will start by learning how to recondition a DEM file. You will then calculate flow direction and flow accumulation and learn how to generate drainage lines and catchment basins. Be sure to save your progress often. 

Part 1:

Setting Up a

Continuing an Existing GIS Project

Opening an existing project

  1. Using Windows, navigate to your HydrologyLab folder from Labs 1 and 2.
  2. Double-click the HydrologyLab.aprx ArcGIS Project File.

Creating a new map

...

Now you will create You will begin by creating a new map document for your project. You will begin by opening ArcGIS Pro.Lab 3.

  1. Open the HydrologyLab.aprx file.
  2. On the Standard toolbar, click the  the Insert tab and  tab and click New Map.
    Image Removed
    Image Added
  3. Double-click the Map title in the table of contents.

  4. Type Lab3 for Name. Click OKAt the top of the Contents pane, rename the map to "Lab3".

Adding data in ArcMap

You will begin by adding the data you previously copied into your geodatabase to the map.

  1. On In the catalog Catalog pane, expand the Databases section and Hydrologylabthe HydrologyLab.gdb file geodatabase.
  2. Double-click the HydrologyLab geodatabase to expand it.

Remember that the data frame map view takes on the projection of the first layer added to it. Because you spent time in Lab 2 to ensure that the the DEMft raster  raster was in the correct State Plane Texas South Central projection, you will add that layer first, so that your data frame map view will also display in the correct local projection.

  1. Drag the  the DEMft raster into the Map Display Lab3 map view.

You can now be sure that the data frame map view will display in the State Plane Texas South Central projection inherited from the the DEMft layer layer. Next you will add the the Flowlines layer layer.

  1. Click In the Catalog pane again and drag the Flowlines and Subbasin feature class classes into the Map Display Lab3 map view.

Though the Flowlines feature class data is still stored in the NAD 1983 geographic coordinate system, in which it was originally provided from NHDPlus, the Flowlines layer is now being projected-on-the-fly into the State Plane Texas South Central projection of the data frame. Remember that projection-on-the-fly may suffice for the purposes of visual display only, but it cannot be used to calculate spatial relationships. Since you will be calculating many such spatial relationships throughout this lab, it is important for all data to be stored in same projection.

...

You will now project the Flowlines layer into the State Plane Texas South Central projection.

  1. In the Analysis tab, click the Tools button to open the Geoprocessing pane.
  2. In the 'Find Tools' search box, type "project".
  3. Click the Project 
  4. Open Toobox.
  5. Double-click the Data Management Tools toolbox then Projections and Transformations toolset then the Project tool.
  6. For ‘Input Dataset or Feature Class’, drag in the Flowlines layer from the Table of Contents.

...

  1.  use the drop-down menu to select the Flowlines layer.
  2. For ‘Output Dataset or Feature Class’, rename “Flowlines “Flowlines_Project” Projectto “FlowlinesFlowelines_StatePlane”StatePlane, since that is the name of the projection you will be using.
  3. For the ‘Output Coordinate System’ box, use the  use the drop-down menu to to select the DEMft layer.

Notice that the familiar State Plane Texas South Central projection is now listedBecause both the input and output coordinate systems are based on the NAD 1983 geographic coordinate system, no geographic transformation is required.

  1. Ensure your ‘Project’ window appears as shown below and and click Run Run.
    Image Removed
    Image Added

Now that you have a correctly projected layer, you no longer need the original NAD 1983 layer.

  1. In the Table of Contents pane, right-click the Flowlines layer and select Remove.
  2. Repeat the above steps for the Subbasin layer to produce a Subbasin_StatePlane layer.
  3. Click Save on top of the menu bar to save the map documentSave your project.

Part 2: DEM Reconditioning

...

First, you will convert the vector flowlines into a corresponding raster with exactly the same dimensions (rows, columns, cell size, and alignment) as the DEM raster. Every raster cell intersecting the flowlines will be assigned a value equal to the COMID (Common Identifier, or unique ID) of the intersecting vector flowline and all other raster cells will be assigned a value of NoData.

  1. At the top left of the Geoprocessing pane, click the Back button.
  2. In the search box, type "feature to raster".
  3. Click the Feature to Raster tool
  4. Click the Toolbox icon.
  5. Collapse the Data Management Tools toolbox.
  6. Double-click the Conversion Tools toolbox > To Raster toolset > Feature to Raster tool.
  7. For ‘Input features’, drag in the select the Flowlines_StatePlane layer from the Table of ContentsStatePlane layer.
  8. Use the ‘Field’ drop-down menu to For ‘Field’, select the COMID field.
  9. For ‘Output raster’, rename the raster from “FeatureFeature_Flow1” to “FlowlineRaster”Flow1” to “FlowlineRaster.

In order to align the cells in this new flowlines raster with the cells in the DEM raster, you will alter the extent, snapping, and cell size using the Environments settings..

  1. At the top of the Geoprocessing window, click the Environments tab on the right.
  2. Under the 'Processing Extent' section, for 'Extent', select Same As layer: DEMft.

The listed Extent coordinates will be updated based on the geographic extent of the DEMft raster.

  1. Under the 'Raster Analysis' section, use the ‘Cell Size’
  2. At the top of the ‘Feature to Raster’ window, click the Environments… button.
  3. For Extent, use the ‘Extent’ drop-down menu to select the Same as layer DEMftlayer DEMft.
  4. Use the ‘Snap Raster’ drop-down menu to to select the  the DEMft raster raster.
    Image Removed

 

...


  1. Image Added

  2. At the top of the Geoprocessing window, click the Parameters tab on the left.
  3. Ensure your ‘Feature to Raster’ window appears as shown below and click Run.
    Image Removed

...


  1. Image Added

  2. In the Contents pane, uncheck the Subbasin_StatePlane layer.

If you zoom in closely, you will notice the raster cells intersecting the Flowlines_StatePlane layer have been added to the FlowlineRaster layer and are assigned a color.

  1. Symbolize the FlowlineRaster layer using Unique Values based on the COMID values stored in the Value field, so you can see how the COMID values have been assigned to the cells.

  1. In the Table of Contents pane, collapse the FlowlineRaster symbology.

Creating a binary raster

You currently have a raster where each cell contains either the COMID value or the value NoData. ( NoData cells are transparent, hence you can still see the DEMft layer beneath them. ) Ideally, you would like a raster where all the flowline cells are assigned a value of 1 to use as a simple flag.

  1. Click the ArcToolbox tab.
  2. Collapse the Conversion Tools toolbox.
  3. Double-click the Spatial Analyst Tools toolbox > Math toolset > Logical toolset > Greater Than tool.

...

  1. Greater Than tool.
  2. Return to the Geoprocessing pane.
  3. At the top left of the Geoprocessing pane, click the Back button.
  4. In the search box, type "greater".
  5. Click the Greater Than (Spatial Analyst Tools) tool.

The Greater Than tool creates a binary raster with a value of 1 anytime the value in the first input raster is greater than the corresponding value in the second input raster. In this case, you would like to assign a value of 1 anytime the COMID value is greater than 1.

  1. For ‘Input raster or constant value 1’, drag in the select the FlowlineRaster layer from the Table of Contents.
  2. For ‘Input raster or constant value 2’, type “1” 1.
  3. For ‘Output raster’, rename the raster from “GreaterGreater_Flow1” to “FlowlineBinary”Flow1” to “FlowlineBinary.
  4. Ensure your ‘Greater Than’ window appears as shown below and click Run.

The resulting raster assigns each cell a value of 1 when it intersects with a flowline and a value of NoData when it does not intersect a flowline.

...

Though you now have a uniform value of 1 to flag the presence of a flowline cell, the remaining cells have a value of NoData, which is not useful for performing mathematical operations across all the cells, so you would like to reassign all cells with a value of NoData to a value of 0.

  1. At the top left of the Geoprocessing pane, click the Back button.
  2. In the search box, type "reclassify".
  3. Click the Reclassify tool
  4. Click the Tools icon.
  5. Within the Spatial Analyst Tools toolbox, collapse the Math toolset.
  6. Within the Spatial Analyst Tools toolbox, double-click the Reclass toolset à Reclassify tool.
  7. For ‘Input raster’, drag in the select the FlowlineBinary layer from the Table of Contents.
  8. Use the For ‘Reclass field’ drop-down menu to select the Value field.

In the ‘Reclassification’ table, you will see a list of old values and new values. You would like to maintain all old values of 1, but you would like to assign all old values of NoData to a new value of 0.

  1. In the New values column, replace the “NoData” value with a value of “0”0.
  2. For ‘Output raster’, rename the raster from “Reclass_Flow1” to “Reclassify”.Reclass_Flow1” to “Reclassify”.
  3. At the top of the Geoprocessing window, click the Environments tab on the rightClick the Environments… button.
  4. For Processing Extent, use the ‘Extent’ drop-down menu to select Same as layer DEMft.
  5. Use the ‘Snap Raster’ drop-down menu to select the DEMft raster.
  6. Ensure your ‘Reclassify’ window appears as shown below and click Run.

...

You will notice that the output raster is a rectangle that contains the geometry of the subbasin – but does not match it exactly.  In the next section (Calculating Euclidean Distances) you will assign a “mask” that will define a more specific geometry.  The null values in this raster prevent this from being an option - so we will retroactively clip the reclassified raster.

  1. At the top left of the Geoprocessing pane, click the Back button.
  2. In the search box, type "clip".
  3. Click the Clip Raster tool
  4. Click the Toolbox icon.
  5. Double-click the Data Management toolbox > Raster toolset > Raster Processing toolset > Clip tool.
  6. For ‘Input Raster’, drag in the Reclassify layer.
  7. Use the ‘Output Extent’ drop-down menu to select the Subbasin_StatePlane layer
  8. Click ‘Use Input Features for Clipping Geometry’
  9. For ‘Output raster’, rename the raster to “FlowlineReclass”.
  10. Ensure that your ‘Clip’ window appears as shown below and click Run.



  11. Open the attribute table for the “Reclassify” layer and note the ‘Count’ of cells with a value of 0.
  12. Now open the attribute table for the “FlowlineReclass” layer and note the ‘Count’ of cells with a value of 0.

Notice that although the visual geometry of the two layers has changed (one is a rectangle, and one is the shape of the subbasin) the total number of cells has not changed. ArcGIS has not automatically updated the attribute table for the clipped raster.for the clipped raster.

  1. At the top left of the Geoprocessing pane, click the Back button.
  2. In the search box, type "build raster".
  3. Click the 
  4.  Click the ArcToolbox tab
  5. Collapse the Raster Processing toolset and open the Raster Properties toolset > Build Raster Attribute Table tool tool.
  6. Drag in the “FlowlineReclass” layer and click Run.
  7. Now open the “FlowlineReclass” layer again and note that the number of cells that have been assigned a 0 have decreased to reflect the clipped geometry.
  8. Remove “Reclassify”

...

Next, you will create a new raster where the value of the cell indicates the distance in feet to the nearest flowline.

  1. At the top left of the Geoprocessing pane, click the Back button.
  2. In the search box, type "euclidean".
  3. Click the Euclidean Distance 
  4. Click the Toolbox icon.
  5. Within the Spatial Analyst Tools toolbox, collapse the Reclass toolset.
  6. Double-click the Distance toolset > Euclidean Distance tool.
  7. For ‘Input raster or feature source data’, drag in the Flowlines_StatePlane layer from the Table of Contents pane.
  8. For ‘Output distance raster’, rename the raster from “EucDist_Flow1” to “FlowlineDistance”.
  9. Click the Environments… button.
  10. For Processing Extent, use the ‘Extent’ drop-down menu to select Same as layer DEMft.
  11. Use the ‘Snap Raster’ drop-down menu to select the DEMft raster.

...

You should now see cells that vary in color the farther away they are from the nearest flowline.

Performing map algebra

...

Finally, you are ready to perform the reconditioning step. You can think of this as digging a trench with a funnel-shaped cross-section along each flowline to ensure that water will flow in the intended direction. The math behind this step is explained in the diagram below and all units are in feet, since the State Plane Texas South Central project stores XY coordinates in feet and since you also recalculated the Z elevations in Lab 2 in feet.

  1. Click ToolsAt the top left of the Geoprocessing pane, click the Back button.
  2. Within the Spatial Analyst Tools toolbox, collapse the Distance toolset.
  3. In the search box, type "calculator".
  4. Click the Raster Calculator toolDouble-click the Map Algebra toolset > Raster Calculator tool.

When entering expressions in the raster calculator, your syntax must be exact, so though you could technically type in the equation below, we’d recommend entering everything by clicking the mouse, so you do not get any syntax errors (at least until you’ve learned the proper syntax).

  1. By double-clicking the layer names and single-clicking the calculator buttons, enter the following equation: "DEMft" - 30 * "FlowlineReclass" - 0.02 * (1500 - "FlowlineDistance") * ("FlowlineDistance" < 1500).
  2. For ‘Output raster’, rename the raster from “demftdemft_raster” to “DEMRecon”raster” to “DEMRecon.
  3. Ensure your ‘Raster Calculator’ window appears as shown below and click Run.

You should notice that the DEMRecon looks very similar to the original DEMft. To better understand the difference between the two, you will actually calculate the difference between their corresponding values.

  1. Click the Tools tab.
  2. Double-click the Raster Calculator tool again.
  3. Using the same clicking technique as before, enter the following equation: "DEMft” – “DEMRecon”.
  4. For ‘Output raster’, rename the raster to “DEMDiff”DEMDiff.
  5. Ensure your ‘Raster Calculator’ window appears as shown below and click Run.

...

The DEMDiff layer displays the amount of earth that has been removed through the reconditioning process.

 

Part 3: Analyzing Hydrologic Terrain

...

The Fill tool fills sinks in the DEM raster to remove small imperfections in the data. If cells with higher elevations surround a cell, the water gets trapped in that cell and cannot flow. The Fill tool modifies the elevation of the original DEM to eliminate these problems.

Image Modified

  1. At the top left of the Geoprocessing pane, click the Back button.
  2. In the search box, type "fill".
  3. Click the Fill tool
  4. Click Tools from Analysis tab.
  5. Within the Spatial Analyst Tools toolbox, double-click the Hydrology toolset à Fill tool.
  6. For ‘Input surface raster’, drag in the select the DEMRecon layer from the Table of Contents.
  7. For ‘Output surface raster’, rename the raster from “Fill_DEMReco1” to “FIL”Fill_DEMReco1” to “FIL.
  8. Ensure your ‘Fill’ window appears as shown below and click Run.

Calculating flow direction

Now you will calculate the cardinal direction in which water from each cell is expected to flow based on the elevations of surrounding cells. Each direction is assigned one of 8 integer values between 1 and 128 as indicated in the illustration below.

  1. Click Tools from Analysis tabAt the top left of the Geoprocessing pane, click the Back button.
  2. In the search box, type "flow".
  3. Click the Flow Direction tool Hydrology toolset, double-click the Flow Direction tool.
  4. For ‘Input surface raster’, drag in the select the FIL layer from the Table of Contents.
  5. For ‘Output flow direction raster’, rename the raster from “FlowDirFlowDir_FiIL1” to “FDR”FiIL1” to “FDR.
  6. Ensure your ‘Flow Direction’ window appears as shown below and click Run.

The result may appear a bit strange at first, due to the color scheme assigned to each cardinal direction.

  1. Symbolize the FDR layer using Unique Values with a smooth black and white gradient for the Color Scheme.

...

Finally, you will calculate flow accumulation in each cell as illustrated below. Flow accumulation is dependent on the flow direction you calculated previously.

  1. Click Tools from Analysis tabAt the top left of the Geoprocessing pane, click the Back button.
  2. In the search box, type "flow".
  3. Click the Flow Accumulation  Hydrology toolset, double-click the Flow Accumulation tool.
  4. For ‘Input flow direction raster’, drag in the select the FDR layer from the Table of Contents.
  5. For ‘Output accumulation raster’, rename the raster from “FlowAccFlowAcc_FDR1” to “FAC”FDR1” to “FAC.
  6. Ensure your ‘Flow Accumulation’ window appears as shown below and click Run.



  7. Turn off the Flowlines_StatePlane layer to better see the FAC layer.
  8. Right-click the FAC layer and click the Symbology.
  9. For ‘Symbology’, use drop-down menu to select Classify.
  10. In the ‘Method’ drop-down menu to select Equal Interval.
  11. Use the ‘Classes’ drop-down menu to select 8 classes.
  12. For ‘Class Breaks’, double-click the numbers in the Upper Value column  and typethe following list: 100, 300, 1000, 3000, 10000, 30000, 100000. (Leave the final max value, 351408 as is.)
  13. Use the ‘Color Ramp’ drop-down menu to select the multipart color scheme.



...

  1. Click the Catalog tab.
  2. Right-click the HydrologyLab geodatabase and select New > Feature Class….
  3. For ‘Feature Class Name’, type “Outlet”.
  4. Use the ‘Geometry Type’ drop-down menu to select Point.
  5. For Coordinate System, select Current Map.
  6. Click Run.
  7. On the Standard toolbar, click the Edit tab and click the Create button.

  8. On the Create Features pane, select Outlet layer and click Point. Click ->.

  9. In the Map Display, click the outlet pixel to draw a point there.

  10. On the Editor toolbar, click Save.
  11. When asked if you want to save your edits, click Yes.
  12. Close the Editor toolbar and the Create Features tab.

...

Notice that this is very close, but does not exactly match the boundaries of the subbasin you were originally provided from NHDPlus.

  1. In the Table of Contents pane, turn off all layers beneath the Watershed layer, so that only the cells within the newly defined subbasin are visible.

...

  1. Click Tools from Analysis tab.
  2. In the Hydrology toolset, double-click the Stream Link tool.
  3. For ‘Input stream raster’, select the Streams layer from the drop-down menu.
  4. For ‘Input flow direction raster’, select the FDR layer from the drop-down menu.
  5. For ‘Output raster’, rename “StreamL_Stre1” to “StreamLinks”.
  6. Ensure your ‘Stream Links’ window appears as shown below and click Run.

  7. Symbolize the StreamLinks layer using unique values.
  8. In the Table of Contents pane, collapse the StreamLinks symbology.

...

  1. Click Tools from Analysis tab.
  2. In the Hydrology toolset, double-click the Watershed tool.
  3. For ‘Input D8 flow direction raster’, select the FDR layer from the drop-down menu.
  4. For ‘Input raster or feature pour point data’ select the StreamLinks layer from the drop-down menu.
  5. For ‘Output raster’, rename “Watersh_FDR2” to “Catchments”.
  6. Ensure your ‘Watershed’ window appears as shown below and click Run.

  7. Symbolize the Catchments layer using unique values.

  8. In the Table of Contents pane, collapse the Catchments symbology.

...

  1. Click Tools from Analysis tab.
  2. Double-click the Conversion Tools toolbox à From Raster toolset à Raster to Polygon tool.
  3. For ‘Input raster’, select the Catchments layer from the drop-down menu.
  4. For ‘Output polyline features’, rename “RatsterT_Catchme1” to “CatchmentPoly”.
  5. Uncheck Simplify polylines.
  6. Ensure your ‘Raster to Polygon’ window appears as shown below and click Run.

  7. Symbolize the CatchmentPoly layer using unique values with ID as the value field.

  8. In the Table of Contents pane, collapse the CatchmentPoly symbology.

...

  1. Click Tools from Analysis tab.
  2. Collapse the Conversion Tools toolbox.
  3. In the Hydrology toolset, double-click the Stream to Feature tool.
  4. For ‘Input stream raster’, drag in the StreamLinks layer from the Table of Contents pane.
  5. For ‘Input flow direction raster’, drag in the FDR layer from the Table of Contents pane.
  6. For ‘Output polyline features’, rename the feature class from “StreamT_StreamL1” to “DrainageLines”.
  7. Uncheck Simplify polylines.
  8. Ensure your ‘Stream to Feature’ window appears as shown below and click Run.

...

  1. Click Tools from Analysis tab.
  2. In the Hydrology toolset, double-click the Stream Order tool.
  3. For ‘Input stream raster’, select the Streams layer from the drop-down menu.
  4. For ‘Input flow direction raster’, select the FDR layer from the drop-down menu.
  5. For ‘Output raster’, rename the raster from “StreamO_Stre1” to “StrahlerOrder”.
  6. Ensure your ‘Stream Order’ window appears as shown below and click Run.

  7. In the Table of Contents pane, turn off all layers except for the new StrahlerOrder layer, so that its symbology is more apparent.

...

  1. Again, click the Table Options button and select Joins and Relates > Remove Join(s) > Remove All Joins.
  2. Symbolize the DrainageLines layer using graduated symbols based on the StrahlerOrder field.
  3. In the Table of Contents pane, turn on only the Outlet, DrainageLines, and CatchmentPoly, layers and turn off all other layers.

...