CRWR Online Report 06-05
Introduction to Arc-Hydro: ACEH Basin Pilot Study
by
Adam J. Czekanski, B. S.
Graduate Student
and
Daene C. McKinney, PhD., PE
Principal Investigator
May 2006
CENTER FOR RESEARCH IN WATER RESOURCES
Bureau of Engineering Research • The University of Texas at Austin
J.J. Pickle Research Campus • Austin, TX 78712-4497
This document is available online via World Wide Web at
http://www.ce.utexas.edu/centers/crwr/reports/online.html
i
Contents
Section Page
Preface...........................................................................................................................................iii
1. Geodatabases............................................................................................................................ 1
1.1 Introduction.......................................................................................................................... 1
1.2 Obtaining Software .............................................................................................................. 2
1.3 Overview of the data............................................................................................................ 2
1.3.1 Introduction................................................................................................................... 2
1.3.2 Stream and Watershed Data.......................................................................................... 4
1.3.3 Creating a Geodatabase.................................................................................................. 5
1.3.4 Importing Data into a Geodatabase............................................................................... 9
2. Preparing DEM Datasets ......................................................................................................11
2.1 Global DEM Datasets ........................................................................................................ 11
2.1.1 Downloading SRTM Data .......................................................................................... 11
2.1.2 Convert SRTM Data to Raster Grids.......................................................................... 15
2.2 Mosaic Rasters................................................................................................................... 17
2.3 Define the Spatial Reference for Grids.............................................................................. 20
2.4 Project Grids ...................................................................................................................... 23
3. Data Preprocessing ................................................................................................................ 26
3.1 Make Buffer for the Basin ................................................................................................. 26
3.1.1 Create Basin Feature Class ......................................................................................... 26
3.1.2 Dissolve Basins in a Feature Class ............................................................................. 30
3.1.3 Create Basin Buffer..................................................................................................... 31
3.2 Clip Regional Grids to Basin with Buffer.......................................................................... 33
3.2.1 Set the analysis parameters ......................................................................................... 33
3.2.2 Convert Buffer to Raster............................................................................................. 35
3.2.3 Clip DEM to Basin...................................................................................................... 37
3.3 Select Basin Flowlines....................................................................................................... 39
4. ArcHydro Raster Implementation ....................................................................................... 43
4.1 Introduction........................................................................................................................ 43
4.2 Load the terrain data .......................................................................................................... 44
4.3 Terrain Preprocessing ........................................................................................................ 44
4.3.1 DEM Reconditioning.................................................................................................. 45
4.3.2 Fill Sinks ..................................................................................................................... 47
4.3.3 Flow Direction ............................................................................................................ 49
4.3.4 Flow Accumulation..................................................................................................... 52
4.3.5 Stream Definition........................................................................................................ 54
4.3.6 Stream Segmentation .................................................................................................. 56
4.3.7 Catchment Grid Delineation ....................................................................................... 57
4.3.8 Catchment Polygon Processing................................................................................... 59
4.3.9 Drainage Line Processing ........................................................................................... 60
4.3.10 Drainage Point Processing ........................................................................................ 62
ii
5. WRAPHydro Process ............................................................................................................ 64
5.1 Introduction........................................................................................................................ 64
5.2 Preprocessing ..................................................................................................................... 64
5.2.1 Select the polygon corresponding to the Aceh basin.................................................. 64
5.2.2 Build a network with Flowlines as a complex edge ................................................... 65
5.2.3 Assign HydroIDs to the WRAPFlowLine edges. ....................................................... 69
5.2.3.1 Set Target Locations for HydroIDs...................................................................... 69
5.2.3.2 Set Starting HydroIDs for WRAPFlowLines ...................................................... 71
5.2.3.3 Assign HydroIDs to WRAPFlowLines............................................................. 73
5.3 WRAPHydro Process......................................................................................................... 74
5.3.1 Delineate catchments for each stream segment in WRAPFlowline ........................... 74
5.3.2 Build a relationship between WRAPFlowline and WRAPCatchment ....................... 78
5.3.3 Select streams in the basin and export them to WRAPEdge ...................................... 79
5.3.4 Select the catchments that drain to the selected streams............................................. 85
5.3.5 Dissolve the selected WRAPCatchments to ‘basin’ ................................................... 86
5.3.6 Clip Regional Grids to Basin ...................................................................................... 89
5.3.6.1 Set the analysis parameters .................................................................................. 89
5.3.6.2 Clip DEM to Basin with Buffer........................................................................... 90
5.3.7 Create SnapControlPoint feature class in BaseMap ................................................... 93
5.3.8 Build new network with SnapControlPoint and WRAPFlowline............................. 101
5.3.9 Assign Flow Directions ............................................................................................ 103
5.3.10 Trace Upstream to Select SnapControlPoints on Network..................................... 104
5.3.11 Export selected SnapControlPoints to WRAPJunction .......................................... 106
5.4 Finding Watershed Parameters ........................................................................................ 108
5.4.1 Export BaseControlPoint to ControlPoint ................................................................ 108
5.4.2 Build WRAPJunction and WRAPEdge Network..................................................... 109
5.4.3 Make a copy of the WRAPJunction feature class..................................................... 110
5.4.4 Delete WRAPJunction features and load back from ‘copy’..................................... 111
5.4.5 Set Flow Directions................................................................................................... 115
5.4.6 Set the HydroIDs for Junctions and Edges ............................................................... 117
5.4.7 Determine NextDownID........................................................................................... 119
5.4.8 Calculate LengthDown ............................................................................................. 121
5.4.9 Assign JunctionIDs ................................................................................................... 122
5.4.10 Delineate the upstream area for each WRAPJunction............................................ 125
5.4.11 Calculate the Area, CN and Precip for each WRAPWatershed.............................. 128
5.4.12 Consolidate Area, Curve Number, and Precip for each WRAPJunction................ 130
5.4.13 Assign JunctionID to SnapControlPoint................................................................. 132
5.4.14 Copy parameters from WRAPJunction to ControlPoint......................................... 135
References.................................................................................................................................. 137
iii
Preface
This work benefits from the tremendous efforts of colleagues and former students at The
University of Texas at Austin, including: David R. Maidment, Sergio Martinez, Carlos Patiño-
Gomez, Oscar Robayo, Victoria Samuels, Kristina Schneider, Rebecca Teasley, and Tim
Whiteaker. Any errors are those of the author.
1
1. Geodatabases
1.1 Introduction
The development of a watershed-scale database is fundamental to modern concepts of effective
water resources management, especially at the national scale. Integral databases that include
knowledge and information available about a country’s river basins are often fragmented,
disjointed, incomplete, and sometimes inaccurate. Integrated management of river basins
requires the development of models that are used for many purposes, e.g., to assess risks and
possible mitigation of droughts and floods, manage water rights, assess water quality, and simply
to understand the hydrology of the basin. For this purpose databases are needed from which
models can access the various data needed to describe the systems being modeled. In other
words, a database from which models read input data and to which they write output data. In
order for this concept to work, however, it must have a standard design. The ArcHydro data
model was developed to facilitate organization of water resources data according to the “basin”
principle and to allow access to hydrologic information by models (Maidment, 2002).
A Geographic Information System (GIS) is general-purpose technology for handling geographic
data in digital form. Its abilities include: preprocessing data into a form suitable for analysis,
supporting spatial analysis and modeling directly, and post processing results (Goodchild, 1993).
GIS can offer spatial representation of water resource systems, bring spatial dimensions into
water resource databases, and present an integrated view of the basin. This is accomplished by
combining various social, economic and environmental factors related to spatial entities of a
water resources problem and making them available for use in a decision-making process
(Csillag, 1996).
The recent developments related to geodatabase construction for river basin planning have
included the extension of the ArcHydro data model to include preprocessing of water resources
model parameters. The WRAPHydro data model was derived from the ArcHydro model for the
Water Rights Analysis Package (WRAP) implemented in Texas for the Texas Commission on
Environmental Quality (TCEQ). This data model is structured to suit the needs of the WRAP
parameter processing. WRAP is a hydrological simulation model to evaluate existing water right
permits, permit approvals for new water rights, and overall water management in Texas under a
priority based water allocation system (Wurbs and Dunn, 1996). More recently, WRAPHydro
(Gopalan and Maidment, 2003) has been used to create ArcHydro geodatabases for large water
resources problems, including the Rio Grande basin (Patiño-Gomez and McKinney, 2005) and
the nation of Ethiopia (Asamenaw and McKinney, 2005).
2
1.2 Obtaining Software
The work described in this report requires three special software packages, one commercial
(ArcGIS) and two public domain (ArcHydro Tools and WRAPHydro Tools):
1. ArcGIS from ESRI with an ArcInfo license and the Spatial Analyst extension active.
2. ArcHydro Tools, developed at The University of Texas at Austin, Center for Research in
Water Resources (CRWR), and maintained and freely distributed by ESRI:
ftp site: ftp.esri.com
User: RiverHydraulics
Password: river.1114
3. WRAPHydro Tools, developed at The University of Texas at Austin, CRWR, and
maintained and freely distributed by CRWR:
http://www.ce.utexas.edu/prof/maidment/grad/whiteaker/hydrotools.html
1.3 Overview of the data
1.3.1 Introduction
In this section you will build
• a basemap of geographic and streamflow data for a watershed using the Aceh Basin in
Sumatra, Indonesia as an example. The basemap comprises basin watershed boundaries
and streams from shapefiles.
• a geodatabase to hold all these data layers and to create relationships inside the
geodatabase.
• a point feature class of stream gage sites by inputting latitude and longitude values for
the gages in an Excel table that is added to ArcMap and the geodatabase
Log on to the computer of your choice and make a directory in your workspace for this exercise.
The needed files are located in the course directory:
\ArcHydro_Aceh\Exercises_Data\Participant
The files include shapefiles of:
• Basin polygons – Needed to identify the basin of interest plus a surrounding buffer zone.
Basin polygon and stream shapefiles are often available from government information
systems and may be found on the Hydro 1K website for Australasia for our study area
(http://edc.usgs.gov/products/elevation/gtopo30/hydro/australasia.htmlf).
3
• Streams – Needed to recondition a Digital Elevation Model (DEM) of the study area and
serve as the main river network. These lines sometimes are not available or are not of
sufficient quality. Our streamlines are not sufficient to recondition the DEM and will be
estimated directly from the DEM in Section 4.
The files:
• SumatraBasins.*
• Streamlines.*
define the SumatraBasins (basin boundary polygons) and the Streamlines (river lines)
shapefiles.
4
1.3.2 Stream and Watershed Data
The geospatial data files defining the Sumatra basins are located in the shapefile
SumatraBasins. The rivers for Sumatra are contained in the shapefile Streamlines.
Note that each shapefile is comprised of various files and, therefore, it is easy to make errors
when copying these files to another location. It is recommended that you use ArcCatalog to
copy geospatial data files from one place to another in your workspace, rather than using the
Copy function in Windows Explorer.
• Open ArcMap and add the shapefile SumatraBasins to the map.
Recolor the themes if you wish. Move the cursor to the lower left corner of the display, and
you’ll see the coordinates changing at the bottom of the map display. The coordinates shown
here are approximately (-3,605,214 m; 932,810 m). If you move the cursor to the upper right
corner of the rectangle, you will find approximately (-1,713,647 m; 2,289,923 m). You now
have the reference coordinates for Sumatra.
5
1.3.3 Creating a Geodatabase
ArcGIS uses an object-oriented data model called the geodatabase. This data model gives the
features in your GIS datasets custom behaviors and the possibility to create relationships
between features. In general, a geodatabase model provides a standardized framework into which
various types of data can be loaded. Once created, the geodatabase is a Microsoft Access file
called an ArcGIS personal geodatabase.
• Close ArcMap and open ArcCatalog.
• Right click on the Participant folder and select New / Personal Geodatabase. Name the
new geodatabase Aceh.
6
• Right click on the Aceh geodatabase and select New / Feature Dataset.
• Name the new feature dataset BaseMap and select Edit to set the projection and map extent.
7
We will import the coordinate system from the SumatraBasins shapefile. Select Import from
the choices in the menu display and navigate to the SumatraBasins shapefile.
The coordinate system is now specified:
8
• Click the X/Y Domain tab and enter the coordinates that we found earlier in ArcMap: MinX
= -3605214, MaxX = -1713647, MinY = 932810, MaxY = 2289923.
• Click Apply and OK to finish setting the Spatial Reference Frame of the Feature Dataset.
9
1.3.4 Importing Data into a Geodatabase
We will now import both of the shapefiles into the Aceh geodatabase. We will first import the
SumatraBasins shapefile since this file has the largest extent and the geodatabase will adopt the
spatial reference of the first imported feature class.
• Right-click on the BaseMap feature dataset and click Import / Feature Class (single).
10
• In the Input Features field browse for the shapefile SumatraBasins and select it.
• In the Output Feature Class Name field type the name SumatraBasins.
• Do not enter any information in any of the other fields. Click OK.
• Repeat the same process to input the Streamlines shapefile and give it the name Streamlines
in the Output Feature Class Name field.
• Congratulations! You have finished creating the BaseMap feature dataset with its two new
feature classes (Streamlines and SumatraBasins).
• The final product should look as follows in ArcCatalog.
11
2. Preparing DEM Datasets
2.1 Global DEM Datasets
2.1.1 Downloading SRTM Data
The Shuttle Radar Topography Mission (SRTM) obtained elevation data on a near-global scale
to generate the most complete high-resolution digital topographic database of Earth. SRTM
consisted of a specially modified radar system that flew onboard the Space Shuttle Endeavour
during an 11-day mission in February of 2000. The data are published in 1 arc second (30 m
resolution) grids for the US and 3 arc second (90 m resolution) grids for the rest of the globe
from 56
o
S - 60
o
N latitude.
Two radar data sets were collected at the same time separated by 60 m, the distance between the
main antenna and the outboard antenna. Knowing the distance between the two antennas and the
differences in the reflected radar wave signals, accurate elevation of the Earth's surface was
calculated.
There are several sources available from which you can obtain the SRTM data, including:
NASA (raw data): ftp://e0mss21u.ecs.nasa.gov/srtm/
USGS (somewhat corrected data): http://seamless.usgs.gov/
CGIAR (NoData holes filled): http://srtm.csi.cgiar.org/
Note: The CGIAR site is probably the best source of data since all of the No-Data holes are
filled and the data are ready for use. However, they are not provided in a “seamless” format
and several tiles must be downloaded for the designated area and then joined using the mosaic
function.
12
• Create a new folder in your Participant folder and name it ASC Files.
• Navigate to the CGIAR web site
• Click SRTM Data Search and Download on the sidebar of the screen.
• Enter the Latitude and Longitude of your choice (if known) or highlight the tiles covering the
focus area. For our purposes, select the tiles covering the island of Sumatra (srtm_56_11,
srtm_56_12, srtm_56_13, srtm_57_12, srtm_57_13, srtm_57_14, srtm_58_13, srtm_58_14).
13
• Select the ArcInfo ASCII option and click Search.
Note: Alternatively, you can select Direct Link to FTP Download, select your tiles, and
download all of the tiles at once.
• A screen will appear showing all of the data tile information you selected.
• Click on Data Download (FTP) at the bottom of the page.
14
• Click Save and navigate to the ASC Files folder. Click Save.
• The tile data will be saved as a zip file into the ASC Files folder. Repeat this process to
download zip files for all eight tiles covering the focus area. This can take up to 60 minutes,
depending on the speed of your internet connection.
• Unzip the files for all eight tiles and select the ASC Files folder as the download location.
15
2.1.2 Convert SRTM Data to Raster Grids
• Open ArcMap and then open the ArcToolbox from the standard toolbar menu.
• In the ArcToolbox, go to Conversion Tools / To Raster / ASCII to Raster.
• Navigate to and select the first tile as the Input ASCII raster file and give it a unique name for
the Output raster. Select Integer for the Output data type and click OK.
• Repeat this procedure for each tile until they have all been added to ArcMap as rasters.
16
• Your ASC Files folder will have a folder added for each tile once complete.
• The tiles will appear in ArcMap as shown below.
17
2.2 Mosaic Rasters
Multiple tiles need to be combined or mosaiced together into a larger grid. This can be done
through the Mosaic function in ArcMap or ArcCatalog, or through the Merge function in Arc.
• Create a new folder in your Participant folder and name it Rasters.
• In ArcMap / ArcCatalog, open ArcToolbox / Data Management Tools / Raster /
Mosaic_to_New_Raster
• Navigate to the ASC Files folder and select the rasters for all eight tiles as the Input Rasters
field. Select the Rasters folder as the Output Location and name the new raster mosaic.
Click OK.
18
• This can take up to 30 minutes depending on the computer you are using. Add the resulting
DEM to the display to have a single tile for the whole region.
An alternate method to combine the tiles that is faster and also allows for “no data” holes to be
filled is to use the merge function in Arc.
• On your desktop, go to Start / Programs / ArcGIS / ArcInfo Workstation / Arc.
19
• Arc will prompt you for code input. After the first prompt (Arc:), type “w” (and then hit
Enter). After the next prompt, type “w” followed by the path to the folder with the tile
raster data. Type “w” again after the next prompt and then “grid” after the next. Finally,
type “Mosaic = merge (enter all of the tile raster names)” and click Enter.
Note: Spaces in names (i.e. ASC Files) in the pathline may have to be removed to avoid errors
• Either method will produce a single mosaic raster that covers the entire focus area.
20
2.3 Define the Spatial Reference for Grids
• Close ArcMap and open ArcCatalog to define the Spatial Reference of the mosaic raster.
• Right click on the mosaic raster icon and select Properties. Scroll down to Spatial
Reference. Click the Edit button.
• Select Define the coordinate system interactively. Click Next.
21
• Select the Geographic projection and click Next.
• Select decimal degrees (DD) and click Next.
• Select WGS-1984 datum and click Next.
22
• Make sure the proper Projection and Datum are shown and click Finish.
• Note that a Spatial Reference and Datum are now defined in the Properties of the mosaic
raster. Click OK.
23
2.4 Project Grids
The mosaic raster needs to be projected into the working projection with appropriate cell size.
• Open ArcMap or ArcCatalog and then open ArcToolbox.
• In ArcToolbox, open Data Management Tools / Projections and Transformations /
Raster / Project Raster
• Select the mosaic raster as the Input raster and give it the name mosaic_p for the Output
raster.
24
• Click on the icon for the Output coordinate system. Click the Select button and choose
the following navigational path: Projected Coordinate Systems / Continental / Asia / Asia
South Albers Equal Area Conic. Click OK.
• Select Cubic for the Resampling technique and 90 as the Output cell size. Click OK.
25
• Open ArcMap and add the new raster projection (the raster will take 15-20 minutes to
project).
26
3. Data Preprocessing
3.1 Make Buffer for the Basin
3.1.1 Create Basin Feature Class
Objective: Create a feature class for the Aceh River basin
• Open ArcMap. Add the SumatraBasins feature class from the Aceh geodatabase.
• Click on the Select button in the main toolbar. Hold down the left button of your mouse
and draw a box around the northern third of the island of Sumatra. All of the basins in the
northern third of the island should now be highlighted
27
• Right click on the SumatraBasins layer and choose Open Attribute Table. Click the
Selected button at the bottom of the window. This will show you the items you have selected
(you should have 26 out of 220 items selected).
• Make sure that Arc Catalog is closed or else the following steps will not work.
• Close the attribute table and right click on the SumatraBasins layer. Select Data / Export
Data ... to produce a new layer.
28
• In the Output shapefile or feature class window, navigate inside the Aceh geodatabase to the
BaseMap feature dataset. Name this new feature class AcehBasins and click Save.
Note: By assigning Arc Hydro standard names like AcehBasins to your feature classes it will be
easier to apply the capabilities of the ArcHydro data model as you will see later in this class (See
page 32 in Arc Hydro book for standards).
• Click OK to export selected features to a new AcehBasins feature class. The program will
automatically convert only the selected features.
Note: If you get a message saying this can’t be done, it means that you have not shut down Arc
Catalog before exporting data. Close Arc Catalog and repeat the export steps if this happens.
29
• Click Yes when asked if you would like to add this theme to the map. Notice the
AcehBasins feature class carries the attributes of SumatraBasins before the data export.
• Use Selection / Clear Selected Features to clear the selections made from SumatraBasins.
• Remove the SumatraBasins feature class from the map and zoom to the AcehBasins layer.
• Save the ArcMap document as Aceh.
30
3.1.2 Dissolve Basins in a Feature Class
Objectve: Dissolve the basins of the AcehBasins feature class into one master basin
• Open the ArcToolbox application and go to Data Management Tools / Generalization /
Dissolve.
• Select AcehBasins as the Input features. Navigate to the BaseMap feature dataset and
name/save AcehBasinsDissolve as the Output feature class. Click OK.
31
• The result is shown below. Remove the AcehBasins feature class from the map.
3.1.3 Create Basin Buffer
Objective: Create a 10 km buffer around the AcehBasinsDissolve feature class
• In the ArcToolbox application, go to Analysis Tools / Proximity / Buffer.
32
• Select AcehBasinsDissolve as the Input Feature.
• Save AcehBufferWatershed as the Output Feature Class (in the BaseMap feature dataset of
the Aceh geodatabase).
• Select Linear unit in the Distance field and specify a 10 km buffer. Leave all remaining
fields with their default values. Click OK.
• The result is shown below.
33
3.2 Clip Regional Grids to Basin with Buffer
3.2.1 Set the analysis parameters
Objective: Establish extent, cell size, and masking parameters
• Add the mosaic_p raster to the ArcMap document.
• Go to SpatialAnalyst / Options in the main toolbar.
• Under the General tab, make sure the Working Directory is your Rasters folder and set the
Analysis Mask to AcehBufferWatershed. Leave all other default settings unchanged.
34
• Click on the Extent tab and set the Analysis Extent to be the same as the
AcehBufferWatershed.
• Click on the Cell Size tab and set the Analysis Cell Size to be the same as the mosaic_p
DEM. Click OK.
35
3.2.2 Convert Buffer to Raster
Objective: Convert the AcehBufferWatershed feature class to a raster
• Right click on the AcehBufferWatershed layer and click Open Attribute Table
• Click Options / Add Field at the bottom of the attribute table. Choose One for the Name
and Short Integer for the Type. Click OK.
• Right click on the field One in the attribute table and select Calculate Values. Type “1”
(Value of One = 1). Click OK and close the attribute table.
36
• Open Spatial Analyst / Convert / Features-to-Raster.
• Select AcehBufferWatershed for the Input features, One for the Field, 90 for the Output
cell size, and Ras_Aceh for the Output raster (save in Raster folder).
• The resulting Ras_Aceh raster covers the same area as the AcehBufferWatershed feature
class.
37
3.2.3 Clip DEM to Basin
Objective: Clip the projected mosaic DEM to the basin using the Aceh raster
• Open Spatial Analyst / Raster Calculator. Clip the island DEM raster mosaic_p to the
area of the Ras_Aceh. Click Evaluate.
• The result is:
38
• The final result is the following figure.
39
3.3 Select Basin Flowlines
Select all the Streamlines lines that lie within this AcehBufferWatershed and export them to
the BaseMap feature dataset as AcehStreamlines.
• Open the Aceh ArcMap document and add the AcehBufferWatershed and Streamlines
feature classes.
• In the main ArcMap menu, click on Selection / Select by Location.
40
• Select features from the Streamlines layer that intersect the AcehBufferWatershed feature
layer. Click Apply and Close.
• The result is shown below:
41
• Right click on the Streamlines layer and select Data / Export Data.
• Export the selected features to the BaseMap feature dataset and call the output
AcehStreamlines. Click OK and Yes to add the exported data to the map.
• Right click on the AcehStreamlines layer and select Open Attribute Table.
• Add the following fields (Options / Add Field) if they are not present: HydroID (long int),
LengthDown (double), JunctionID (long int). Close the attribute table.
42
• Remove the Streamlines layer from the map.
43
4. ArcHydro Raster Implementation
4.1 Introduction
The purpose of this exercise is to illustrate, step-by-step, how to use the major functionality
available in the ArcHydro tools for Terrain Processing. This is a hands-on document focusing on
how, not why. There is little discussion on implementation or internal operation of the tools.
This document is targeted to an experienced water resources ArcGIS user who wants to learn
how to use the tools. The online help provides more detail on the tools operation.
In this section, we will perform terrain analysis on a DEM of the Aceh Basin on Sumatra in
Indonesia. The ArcHydro tools are used to derive several data sets that collectively describe the
drainage patterns of the catchment. Raster analysis is performed to generate data on flow
direction, flow accumulation, stream definition, stream segmentation, and watershed delineation.
These data are then used to develop a vector representation of catchments and drainage lines
from selected points. The utility of the ArcHydro tools is demonstrated by applying them to
develop attributes that can be useful in hydrologic modeling. To accomplish these objectives, the
user is exposed to important features and functionality of ArcHydro tools, both in raster and
vector environments.
To carry out this exercise, you need to have a computer, which runs the ArcInfo version of
ArcGIS. The data are provided in the accompanying directory:
\ArcHydro_Aceh\Exercises_Data\Participant
You will need the DEM raster dem_aceh (see last section) of the Aceh basin for this section.
44
4.2 Load the terrain data
• Open the Aceh ArcMap document and add the raster file dem_aceh.
4.3 Terrain Preprocessing
Terrain Preprocessing uses the DEM to identify the surface drainage pattern. Once
preprocessed, the DEM and its derivatives can be used for efficient watershed delineation and
stream network generation.
All the steps in the Terrain Preprocessing menu should be performed in sequential order,
from top to bottom. DEM reconditioning and filling sinks might not be required, depending on
the quality of the initial DEM. By doing the DEM reconditioning you can be sure any point on
the stream network will represent a cell (stream cell) for which you can process and compute
attributes.
Be aware, some of the terrain processes may take some time to finish. Processes like Filling
Sinks took about 50 minutes to process on one of our computers, so please be patient!
The existing data to be used in an ArcHydro project can be stored in any geodatabase and loaded
in the map. All vector data created with the ArcHydro tools will be stored in a new geodatabase
that has the same name as the ArcMap document (unless pointed to an existing geodatabase) and
45
in the same directory where the project has been saved. By default, the new raster data are stored
in a subdirectory with the same name as the dataset or Data Frame in the ArcMap document
(called Layers by default and under the directory where the project is stored). The location of
the vector, raster, and time series data can be explicitly specified by going to ApUtilities / Set
Target Locations in the ArcHydro tools.
4.3.1 DEM Reconditioning
This function modifies a DEM by imposing linear features onto it (burning/fencing).
The process includes:
y Taking a stream network and a DEM
y Making a grid of the streams
y Dropping the stream DEM cells by an arbitrary elevation increment
Produces "burned in" DEM streams = mapped streams. It is an implementation of the AGREE
method developed at the University of Texas at Austin in 1997. For a full reference to the
procedure refer to the web link
http://www.ce.utexas.edu/prof/maidment/GISHYDRO/ferdi/research/agree/agree.html.
The function needs as input a raw dem and a linear feature class (like the river network) that both
have to be present in the map document. We do NOT have a sufficient linear feature class
necessary so we will bypass the process. However, the steps to the process are still outlined
below for you to reference if you do have the necessary input for future projects.
46
• Select Terrain Preprocessing / Data Management Terrain Preprocessing in the
ArcHydro tools.
• Select dem_aceh for Raw DEM and AcehStreamlines as AGREE Stream.
• Select Terrain Preprocessing / DEM Reconditioning in the ArcHydro tools.
47
• Select the appropriate dem and linear feature. The output is a reconditioned Agree DEM
(default name AgreeDEM).
This process takes about 5 minutes!
After the process is completed you can use ArcCatalog to view the files. Go to the work folder
and see that there is a folder named Layers, this folder will contain the grids created in the
delineation process. Also a geodatabase with the name of the map, in this case
ArcHydroRaster.mdb, is automatically created and will store the vector results.
4.3.2 Fill Sinks
DEM creation results in artificial pits (sinks) in the landscape. A pit is a set of one or more cells
which has no downstream cells around it. Unless these pits are filled they become sinks and
isolate portions of the watershed. The Fill Sinks function modifies the elevation value to
eliminate these problems.
48
• Select Terrain Preprocessing / Fill Sinks.
• Confirm that the input for DEM is dem_aceh and leave the remaining fields as their default
settings. The output is the Hydro DEM layer, named by default Fil. This default name can
be overwritten. Click OK.
• Upon successful completion of the process, the Fil layer is added to the map (this process
takes approximately 50 minutes).
49
4.3.3 Flow Direction
Digital Elevation Models (DEM) are made up of cells of a particular dimension with an elevation value
assigned to each cell.
67 56 49 46 50
12 11 12
53 44 37 38 48
58 55 22 31 24
61 47 21 16 19
3453
50
cell size
cell
(cell value)
elevation of cell
Using the Eight Direction Pour Point Model, water is assumed to be constrained to flow from
one cell to one of the 8 adjacent cells. Each cell is assigned a value as shown based on the
steepest path rule.
32
16
8
64
4
128
1
2
Using the Eight Direction Pour Point Model a Flow Direction Grid can be constructed from the
DEM.
2 2 4 4 8
1 2 16
1 2 4 8 4
128 1 2 4 8
2 1 4 4 4
11
67 56 49 46 50
12 11 12
53 44 37 38 48
58 55 22 31 24
61 47 21 16 19
3453
Elevation
Direction
Direction (Digital)
50
• Select Terrain Preprocessing / 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.
• Confirm that the input for Hydro DEM is Fil. The Flow Direction Grid is named Fdr by
default. This default name can be overwritten. Click OK.
51
• The flow direction grid Fdr is added to the map upon successful completion of the process
(approximately 5 minutes to complete).
52
4.3.4 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.
• Select Terrain Preprocessing / Flow Accumulation.
• Confirm that the input of the Flow Direction Grid is Fdr. The output is the Flow
Accumulation Grid having a default name of Fac that can be overwritten. Click OK.
53
• The flow accumulation grid Fac is added to the map upon successful completion of the
process (approximately 20 minutes to complete).
54
4.3.5 Stream Definition
This function computes a stream grid which contains a value of "1" for all the cells in the input
flow accumulation grid that have a value greater than the given threshold. All other cells in the
Stream Grid contain no data.
• Select Terrain Preprocessing / Stream Definition.
• Confirm that the input for the Flow Accumulation Grid is Fac. The output is the Stream Grid
having a default name of Str that can be overwritten. Click OK.
A default value is displayed for the river threshold. This value represents 1% of the maximum
flow accumulation: it is the recommended threshold for stream determination. However, any
other value of threshold can be selected. A smaller threshold will result in a denser stream
network and usually in a greater number of delineated catchments.
Note: For the control points we will be using later in the exercise, an area of 2 square
kilometers will need to be used as the threshold
55
• Click OK. Upon successful completion of the process, the stream grid Str is added to the
map (1-2 minutes).
56
4.3.6 Stream Segmentation
This function creates a grid of stream segments that have a unique identification. Either a
segment may be a head segment, or it may be defined as a segment between two segment
junctions. All the cells in a particular segment have the same grid code that is specific to that
segment.
• Select Terrain Preprocessing / Stream Segmentation.
• Confirm that Fdr and Str are the inputs for the Flow Direction Grid and the Stream Grid,
respectively. The output is the Link Grid with the default name Lnk that can be overwritten.
Click OK.
57
• Upon successful completion of the process, the link grid Lnk is added to the map (1-2
minutes).
4.3.7 Catchment Grid Delineation
This function creates a grid in which each cell carries a value (grid code) indicating to which
catchment the cell belongs. The value corresponds to the value carried by the stream segment
that drains that area, defined in the stream segment link grid.
• Select Terrain Preprocessing / Catchment Grid Delineation.
58
• Confirm that the input to the Flow Direction Grid and Link Grid are Fdr and Lnk,
respectively. The output is the Catchment Grid layer with the default name Cat that can be
overwritten by the user. Click OK.
• Upon successful completion of the process, the Catchment grid Cat is added to the map
(approximately 5-10 minutes to complete).
59
4.3.8 Catchment Polygon Processing
This function converts a catchment grid into a catchment polygon feature.
• Select Terrain Preprocessing / Catchment Polygon Processing.
• Confirm that the input to the Catchment Grid is Cat. The output is the Catchment polygon
feature class, having the default name Catchment. Click OK.
60
• Upon successful completion of the process, the polygon feature class Catchment is added to
the map (approximately 5 minutes to complete).
4.3.9 Drainage Line Processing
This function converts the input Stream Link grid into a Drainage Line feature class. Each line
in the feature class carries the identifier of the catchment in which it resides.
• Select Terrain Preprocessing / Drainage Line Processing.
61
• Confirm that the input to Link Grid is Lnk and to Flow Direction Grid is Fdr. The output
Drainage Line has the default name DrainageLine. Click OK.
• Upon successful completion of the process, the linear feature class DrainageLine is added to
the map (approximately 5-10 minutes to complete).
62
4.3.10 Drainage Point Processing
This function generates the drainage points associated with the catchments.
• Select Terrain Preprocessing / Drainage Point Processing.
• Confirm that the input to Drainage Line is DrainageLine and the input to Catchment is
Catchment. The output is Drainage Point, having the default name DrainagePoint. Click
OK.
63
• Upon successful completion of the process, the point feature class DrainagePoint is added to
the map (approximately 25 minutes to complete).
64
5. WRAPHydro Process
5.1 Introduction
In this section, we apply the WRAPHydro process to the Aceh River basin. The main phases
involved in this process are Preprocessing and Watershed Parameterization.
After the base data are obtained, the initial analysis area is defined and some preprocessing is
performed, which is required to calculate the final watershed parameters. The preprocessing
basically deals with defining the basin boundary to set the analysis extent for any further
processing. The ArcHydro and WRAPHydro tools are then used to calculate watershed
parameters for the Aceh basin.
To complete this section, you need to have a computer system running ArcGIS with an ArcInfo
license and the Spatial Analyst extension active. The ArcHydro tools and WRAPHydro tools
must be installed on the computer. The WRAPHydro tools may be downloaded from Dr. David
Maidment’s Student Homepages website at
http://www.ce.utexas.edu/prof/maidment/grad/whiteaker/hydrotools.html
5.2 Preprocessing
5.2.1 Select the polygon corresponding to the Aceh basin
• Open ArcMap. Save a new document as WRAPHydroProcess.mxd.
• Add the AcehBasinsDissolve, DrainageLine, and the AcehBufferWatershed feature
classes to the map.
• Add the dem_Aceh and the Flow Direction (fdr) rasters to the map.
65
5.2.2 Build a network with Flowlines as a complex edge
• Save the ArcMap document. Close ArcMap and open ArcCatalog.
• Right click on the Aceh.mdb Geodatabase and select New / Feature Dataset.
• Name the new feature dataset PreProcess.
• Import the projection parameters from the BaseMap feature dataset.
• Export the DrainageLine feature class from the Layers feature dataset to the PreProcess
feature dataset and name it WRAPFlowLine.
• Right click on the PreProcess feature dataset inside the Aceh Geodatabase.
• Click New / Geometric Network. The Build Geometric Network Wizard opens.
• Click Next to skip the first screen in the wizard.
• Make sure ‘Build a geometric network from existing features’ is selected and click Next.
66
• Choose the WRAPFlowline as the feature class to create the network from. Call the network
WRAPFlowLineNetwork and click Next.
• Choose Yes to preserve the existing enabled values (if this window appears) and click Next.
67
• Choose Yes to build the geometric network with WRAPFlowLine as a complex edge and
click Next.
• Choose No as the features do not need to be snapped. Click Next.
68
• Choose No to not assign weights to the network. Click Next.
• Click Finish to create the geometric network. When the process has completed, you will see
a WRAPFlowLineNetwork icon and a WRAPFlowLineNetwork_Junctions icon in the
PreProcess feature dataset.
69
5.2.3 Assign HydroIDs to the WRAPFlowLine edges.
Basins are identified by a ten digit integer HydroID. The first digit specifies the Administrative
Directorate, defined for the purposes of this exercise as the number 1 for the Aceh Directorate.
The next two digits are allocated for the hydrological subregion, or basin. The number 01 is
assigned to the Aceh basin (It is assumed here that all basins will have no more than 99 basins).
The next two digits represent the type of geographic information being managed (feature class).
The number 01 is assigned for control points, 02 for flow lines, 03 for water bodies, 04 for
watersheds, and so on. The last five digits describe the number of the element, so each feature
class may have 99,999 elements.
Table 4.1. Regional HydroID Assignment for every feature class in the Geodatabase
• 1st digit (blue box): Hydro-Administrative Region
• 2nd two digits (yellow boxes): Sub Region or Basin
• 3rd & 4th digits (red boxes): Feature Class
– Control Point: 01
– HydroEdge: 02
– WaterBody: 03
– Watershed: 04
– And so on
• 5th – 9th digits (green boxes): Feature Number (1 - 99 999)
These WRAPFlowLines lie within the Aceh basin, so all HydroIDs for WRAPFlowLines will
begin with the number 01 to indicate the Aceh basin. After the regional identifier, the number 02
indicates that these features are flow lines. So, each WRAPFlowLine HydroID will be prefixed
by _0102, and the last five digits will describe the number for every stream.
5.2.3.1 Set Target Locations for HydroIDs
• Create a new folder called WRAPHydroGrids in the Raster folder.
• Close ArcCatalog and open the WRAPHydroProcess ArcMap document.
• Add the WRAPFlowLines layer to the map and remove DrainageLines.
70
• Click the Set Target Locations in the ApUtilities. Then select HydroConfig from the
next box.
• Select WRAPHydroGrids as the target for Rasters and Aceh.mdb as the target for
Vectors and Time Series.
71
5.2.3.2 Set Starting HydroIDs for WRAPFlowLines
• Click the Editor Toolbar and click Start Editing.
Hint: If the editor toolbar is not visible, add it by clicking View / Toolbars / Editor.
• Go to the HydroID Tables Manager in the ApUtilities menu of the ArcHydro toolbar.
Click the LayerKey Table tab.
• Right click in the first blank under the words Layer Name and click Add.
• Type WRAPFlowLine as the layer name and 1 as the layer key. Click OK.
• Click on the HydroID Table tab to provide a HydroID starting point for the
WRAPFlowLine layer key. To establish this key, right click on the word “OTHERS”
under Layer Key and click Add.
72
• Type “1” as the Layer Key and 1010200000 as the HydroID. Thus, the first HydroID
assigned to a WRAPFlowLine will be 1010200001; the second will be 1010200002, and
so on. Click OK.
• Click Close to close the HydroID Tables Manager. Stop the editing process.
73
5.2.3.3 Assign HydroIDs to WRAPFlowLines
• In the Attribute Tools menu of the ArcHydro toolbar, click Assign HydroID.
• Highlight the WRAPFlowline feature class, and click OK to assign HydroIDs to all
WRAPFlowline features (Click Yes to overwrite existing HydroIDs). When the tool
finishes, the range of HydroIDs assigned is displayed.
• Be sure that the Flow Direction grid appears at the bottom of the layers in the table of
contents, otherwise you may receive errors when you try to assign the HydroIDs.
74
5.3 WRAPHydro Process
5.3.1 Delineate catchments for each stream segment in WRAPFlowline
• Add the WrapHydro toolbar to the menu.
• In the WRAPHydro toolbar, click Settings to open the Settings form and click the Options
tab.
• In the Watershed Delineation section, specify WRAPFlowLine as the Source Layer,
HydroID as the Source Attribute, and square kilometers as the Desired Units. Click OK.
The WRAPHydro tools look at spatial analyst settings when performing raster operations.
Therefore, the extent and cell size should be set in Spatial Analyst before delineating
watersheds with the WRAPHydro tools.
75
• Click Options in the Spatial Analyst toolbar.
Hint: If the Spatial Analyst toolbar is not visible, click View / Toolbars / Spatial Analyst
• Click the Extent tab. Set the Analysis extent to Same as Layer “fdr”.
• Click the Cell Size tab. Set the Analysis cell size to Same as Layer “fdr”.
• Click OK.
76
• In the Advanced Tools menu of the WRAPHydro tools, click Delineate Watersheds.
• Save the output watersheds as WRAPCatchments into the PreProcess feature dataset.
The WRAPHydro tools read the inputs from the Settings form and delineate watersheds. In this
case, a WRAPCatchment is created for every WRAPFlowLine feature (Total processing time
will be approximately two hours).
77
• Check that each delineated watershed has a field DrainID which is equal to the HydroID of
the stream it drains to.
78
5.3.2 Build a relationship between WRAPFlowline and WRAPCatchment
• In the ArcMap table of contents, right click on the WRAPFlowLine feature layer. Click
Joins and Relates / Relate.
• Choose HydroID as the field in WRAPFlowLine that relate will be based on.
• Choose WRAPCatchments as the layer to relate to WRAPFlowLine.
• Choose DrainID as the key field in WRAPCatchments.
• Type WRAPFlowLineHasWRAPCatchment as the relate name. Click OK.
79
5.3.3 Select streams in the basin and export them to WRAPEdge
Objective: Export all streams that make up the Aceh basin to the WRAPEdge feature class
• Close ArcMap and open ArcCatalog.
• Create a new feature dataset in the Aceh.mdb Geodatabase called WRAPHydro with the
same geographic properties as the PreProcess feature dataset.
• Close ArcCatalog and reopen the WRAPHydroProcess document in ArcMap.
• The flow direction for every FlowLine must be assigned as the first step. Go to the ArcHydro
toolbar and then to Network Tools / Set Flow Direction.
80
• Select the WRAPFlowLine feature class as the Layers input file.
• Select With Digitized Direction for the method to Select Flow Direction. Click OK.
• Select Start Editing in the Editor toolbar.
• Open the WRAPFlowLine attribute table and select Options / Add Field. Name the new
field FlowDir and select Short Integer as the field type. Click OK.
81
• Right click on the name FlowDir at the top of the new field. Select Calculate Values and
assign a value of “1” to every entry in the FlowDir field. Click OK and then Stop Editing in
the Editor toolbar. Close the attribute table.
To select all of the WRAPCatchments that make up the Aceh basin, we need to initially select all
of the streams that lie in the basin. These streams are selected by placing a flag at the outlet of
the basin, and then tracing upstream. The Utility Network Analyst must first be configured to
return the results of the trace as a selection.
• In the Utility Network Analyst toolbar, click Analysis / Options.
82
• In the Results tab, choose Selection for the Results format. Select all features, including
edges and junctions for the Results content. Click OK.
• Select the Add Edge Flag Tool from the Utility Network Analyst toolbar.
83
• Place a flag at the most downstream location in the Aceh basin by clicking near the
downstream end of the last edge in the basin. This location is shown in the image below.
Note that this location is also just upstream of the most downstream FlowLine in the basin
because the WRAPFlowLine feature class includes a 10 kilometer buffer. The original
polygon describing the Aceh subbasin can be added as a reference.
• Select Trace Task / Trace Upstream from the Utility Network Analyst toolbar.
84
• Click the Solve button on the Utility Network Analyst toolbar to perform the trace. All
of the WRAPFlowLines that are on the stream network for the Aceh basin will be selected.
• Export the WRAPFlowLines to the WRAPHydro feature dataset and call the result
WRAPEdge.
85
5.3.4 Select the catchments that drain to the selected streams.
Objective: Identify all WRAPCatchments that drain to the steams of the Aceh basin
• Right click on the WRAPFlowLine layer in the ArcMap table of contents and click Open
Attribute Table.
• Click Options / Related Tables and select the relationship to WRAPCatchments.
The WRAPCatchments attribute table appears automatically and the items related to the
selected WRAPFlowLines are highlighted.
86
5.3.5 Dissolve the selected WRAPCatchments into a single basin
Objective: Dissolve the selected WRAPCatchments to create a single polygon ‘basin’ which
defines the boundary of the Aceh Basin
• Open the attribute table for WRAPCatchments and right click the HydroCode field. Click
on Calculate Values.
• Assign the number 1 to the HydroCode in the field calculator. The field calculator will only
operate on selected WRAPCatchments.
Now all selected WRAPCatchments have a HydroCode of 1.
87
• Close the attribute table and launch the ArcToolbox application. Go to Data Management
Tools / Generalization / Dissolve.
• Select the WRAPCatchments as the Input Features layer. Give the Output Feature Class
the name Basin and save it in the PreProcess feature dataset. Select the Dissolve Fields
based on the HydroCode attribute. Click OK.
88
The Basin feature class now stores the Aceh River basin.
89
5.3.6 Clip Regional Grids to Basin
5.3.6.1 Set the analysis parameters
• Set the analysis parameters in ArcMap / SpatialAnalyst / Option. Set the Analysis Mask to
the Basin.
Set the Extent of the output to be the same as the layer AcehBufferWatershed.
90
• Set the Cell Size to be the same as the input DEM (dem_aceh). Click OK.
5.3.6.2 Clip DEM to Basin with Buffer
• Open Spatial Analyst / Raster Calculator. Clip the basin raster dem_aceh to the area of
the Basin layer. Click Evaluate.
91
The result is:
• Clip the Flow Direction Grid to the analyst mask using Raster Calculator.
92
The grids used for WRAPHydro analysis are now clipped to cover the Aceh Basin exactly.
93
5.3.7 Create SnapControlPoint feature class in BaseMap
Objective: Create a SnapControlPoint feature class using the BaseControlPoint feature class
• Close ArcMap and open ArcCatalog.
• Export the BaseControlPoint shapefile from the Participant folder to the BaseMap feature
dataset as a new feature class and call it BaseControlPoint. Close ArcCatalog.
• Open your document WRAPHydroProcess.mxd in ArcMap and add the BaseControlPoint
feature class.
• Open the attribute table of BaseControlPoint. It should contain the following fields (add
them if necessary): DrainageArea (double), LengthDown (double), AvgCN (Double),
AvgPR (double), JunctionID (long int), HydroID (long int), NextDownID (long int).
94
• Click Options / Add Field to add one final field.
• Call the field WRAPCode and make it of type Text (15 digits length). Click OK. We will
use this field as an identifier key field later on.
• Right click on the WRAPCode field and click Calculate Values.
95
• Copy the values from the CRWRCode field into WRAPCode using the field calculator.
Click OK and close the attribute table.
• Right click on the BaseControlPoint feature class and select Data / Export Data.
• Call this new feature class SnapControlPoint and save it in the PreProcess feature dataset.
Click OK.
• Start an edit session if one has not already been started (Editor / Start Editing).
96
• In the upper menu of ArcMap go to Selection / Select by Location. Select
SnapControlPoints that are “within a distance of” the feature WRAPFlowLine and apply a
buffer to the features of 100 meters. Click Apply (the process for selection will take about
1-2 minutes) and then Close.
Now all of the SnapControlPoints within 100 m of WRAPFlowLine are selected. However, we
want to isolate those points that are further than 100 m from WRAPFlowLine.
97
• Open the SnapControlPoint attribute table.
• Click Options / Switch Selection.
Now the SnapControlPoints further than 100 m from WRAPFlowLine are selected.
• Go to Editor / Snapping
98
• Check the SnapControlPoints, WRAPFlowLine, and Edit Sketch boxes
• In the Editor Toolbar, select Modify Feature as the Task and SnapControlPoint as the
Target.
• Go to the Selection menu and select Set Selectable Layers….
99
• Clear all selections and check only the SnapControlPoint layer. Click Close.
• Now we are ready to move points! Use the Zoom In tool to view the selected points
close up. Click on the Edit Tool and click away from the point (so that it is no longer
highlighted). Click on the previously selected SnapControlPoints and drag within 100 m of
the nearest WRAPFlowLine (or an otherwise appropriate location on the stream network).
Note: If you leave all of the points highlighted, they will all move when you attempt to move any
one highlighted point.
100
• Go to Editor / Stop Editing once all points have been moved.
101
5.3.8 Build new network with SnapControlPoint and WRAPFlowline
Objective: Delete the old network and build a new one with SnapControlPoint and
WRAPFlowline, and snap the junctions to the edges by giving a 100 m snapping tolerance.
• Save and close ArcMap.
• Open ArcCatalog. Go to the Aceh Geodatabase / PreProcess feature dataset /
WRAPFlowLineNetwork. Right click on WRAPFlowLineNetwork and click Delete to
delete the network.
• Right click on the PreProcess feature dataset and go to New / Geometric Network.
• Choose to Build a geometric network from existing features and click Next.
• Select the WRAPFlowLine and SnapControlPoint feature classes to build the network
from and name the network PreProcess_Network. Click Next.
102
• Click Yes to preserve existing enabled values. Click Next.
• Click Yes to include complex edges in the network. Click Next.
• Click Yes to select the snap option and choose the SnapControlPoint feature class to be
moved with a snap tolerance of 100. Click Next.
103
• Do not specify any sources, sinks, or weights for the network (Click No on both slides).
Click Finish to complete the Build Geometric Network Wizard process. When completed,
all SnapControlPoints should be snapped on top of a WRAPFlowLine and you will see the
PreProcess_Network in the Preprocess feature dataset.
5.3.9 Assign Flow Directions
Objective: Assign flow directions to WRAPFlowLines
• Close ArcCatalog.
• Open the WRAPHydroProcess project in ArcMap.
• In the ArcHydro toolbar, click Network Tools / Set Flow Direction.
• Select the WRAPFlowLine as the input for the Layers field, leave the Select Flow Direction
field as Uninitialized, and assign the flow direction based on the FlowDir attribute in the
Select Attribute field. Click OK (the process will take 1-2 minutes).
104
5.3.10 Trace Upstream to Select SnapControlPoints on Network
Objective: Do a “trace upstream” task to select SnapControlPoints on the stream network
• Using the Utility Network Analyst toolbar, place a junction flag at the most downstream
SnapControlPoint in the basin.
• In the Analysis / Options of the toolbar, click on the Results tab. Make sure the Results
format of the trace will be returned as a Drawing and that Results include All Features.
Click Apply and OK.
105
• Choose Trace Task / Trace Upstream . Click the Solve button
to perform the upstream trace.
All network features upstream of the most downstream control point of the Aceh Basin are
selected.
• Open the attribute table for SnapControlPoint.
106
If not all SnapControlPoints are selected, then some SnapControlPoints are spatially coincident
with each other. In other words, some of the points lie directly on top of each other. When this
happens, only one of those points can participate in the geometric network. So, if three points
are in the same location on the network, only one will be selected in the trace upstream task.
Only the SnapControlPoints that are participating in the network will be exported to the
WRAPJunction feature class. This ensures that a clean geometric network is created to operate
when calculating WRAP parameters.
5.3.11 Create a WRAPJunction feature class
Objective: Create a new WRAPJunction feature class from the selected Snap Control Points and
from the creation of an outlet point
• Right click on the SnapControlPoint feature class and go to Export / Export Data. Use the
selected SnapControlPoints to create a new feature class in the WRAPHydro dataset. Call it
WRAPJunction. Click OK.
• Start an edit session (Editor / Start Editing).
107
• In the Editor Toolbar, select Create New Feature as the Task and WRAPJunction as the
Target. Use the Sketch Tool to place an outlet at the end of the Aceh River.
• Open the attribute table for the WRAPJunction feature class and locate the new point you
have created (it should be at the bottom of the table). There will be no data in any of the
fields except for the ObjectID. Give this new point the Name Outlet and fill in the next
sequential number for the WRAPCode and CRWRCode (should be 29). Close the attribute
table.
• Repeat this process to add the outlet to the SnapControlPoint feature class or use Load
Objects to copy the selected feature from WRAPJunction based off the CRWRCode for
the outlet.
• Stop the edit session and save all edits.
108
5.4 Finding Watershed Parameters
5.4.1 Export BaseControlPoint to ControlPoint
Objective: Export the BaseControlPoint file to WRAPHydro and call it ControlPoint.
• Open the attribute table for the BaseControlPoint feature class and highlight all rows. Right
click on the feature class and select Export / Export Data. Create a new feature class in the
WRAPHydro feature dataset, and call the new feature class ControlPoint. Click OK.
• Save changes and close ArcMap.
109
5.4.2 Build WRAPJunction and WRAPEdge Network
Objective: Build a network with WRAPJunction and WRAPEdge using WRAPEdge as a simple
edge feature
A new network called WRAPNetwork is created using the WRAPEdge and WRAPJunction.
This network is built with WRAPEdge as a simple edge feature. Once the network is built the
flow directions are assigned to the network using the FlowDir attributes in WRAPEdge.
• Open ArcCatalog. Right click on the WRAPHydro feature dataset, and go to New /
Geometric Network.
• Create a new geometric network with WRAPJunction and WRAPEdge as a simple edge
feature and call the network WRAPNetwork. Accept the defaults for all other network
creation options.
• The geometric network has been created (the WRAPNetwork icon should appear in the
WRAPHydro feature dataset). Close ArcCatalog.
110
5.4.3 Make a copy of the WRAPJunction feature class
• Open the WRAPHydroProcess project in ArcMap and add WRAPEdge and
WRAPJunction to the map if necessary.
We will use WRAPEdges as the outlet zones for watershed delineation. Each watershed will
eventually be related to the downstream WRAPJunction that the WRAPEdge flows to.
However, currently some WRAPJunctions lie within the middle of a WRAPEdge. By building
the geometric network with simple edges instead of complex edges, the edges will be split when
new junction features are loaded into the middle of them. Therefore, we will “reload” the
WRAPJunctions, automatically splitting any edges with WRAPJunctions in the middle.
111
• Open the attribute table for the WRAPJunction feature class and highlight all rows. Right
click on the feature class and select Export / Export Data. Create a new feature class in the
WRAPHydro feature dataset and call the new feature class WRAPJunction_copy. Click
OK.
5.4.4 Delete WRAPJunction features and load back from ‘copy’
Objective: Delete all the features from WRAPJunction and load the features back from the
‘copy’ file using the Load objects command
• Go to Editor / Start Editing.
• Right click on the WRAPJunction layer in the ArcMap table of contents. Click Selection /
Select All.
112
• Delete all selected features by going to the Edit menu (next to the File menu) and clicking
Delete. All WRAPJunctions will be deleted.
• Make sure the WRAPJunction feature class is the target in the Editor toolbar.
• The Load Objects button is a standard ArcGIS tool that is enabled when an edit session is
open.
• If the Load Objects button does not appear on the screen, add it to the Editor toolbar by
clicking Tools / Customize. Click the Commands tab and the Data Converters category.
Drag the Load Objects command from the Commands side of the window to the Editor
Toolbar.
• Click the Load Objects button.
• Click the folder button and browse to WRAPJunction_Copy. Click Open.
113
• Click Add to add this data source.
• Click Next.
• The WRAPJunction and WRAPJunction_copy have the same fields, so click Next.
114
• Choose to load all of the source data. Click Next.
• The data does not need to be snapped or validated, so click Next and then Finish on the last
two slides to load the data. Now all junctions should be back!
• Stop editing and save edits.
115
5.4.5 Set Flow Directions
Objective: Set the flow directions for WRAPEdges after loading the Junctions
• Click on Network Tools / Set Flow Direction in the ArcHydro tools.
• Select the WRAPEdge as the input for the Layers field, leave the Select Flow Direction field
as Uninitialized, and assign the flow direction based on the FlowDir attribute in the Select
Attribute field. Click OK (the process will take 1-2 minutes).
116
The result is:
117
5.4.6 Set the HydroIDs for Junctions and Edges
Objective: Use HydroID tables manager to set the HydroID values for Junctions and Edges
• Start an edit session (Editor / Start Editing).
• In the ArcHydro tools, open ApUtilities / HyroID Tables Manager.
• Go to the LayerKeyTable tab and right click on the line below WRAPFlowLine to add the
WRAPEdge and WRAPJunction feature classes as Layer Key numbers 2 and 3,
respectively.
118
• Go to the HydroID Table tab and assign the HydroID for the keys 2 and 3. This HydroID
will have 10 digits. The first one corresponds to the country (we will use “1” for Indonesia).
The Aceh River is located in the Aceh basin, identified as the hydrological subregion number
01. The next two digits identify the type of geographic element. Number 01 will be assigned
for the junctions (ControlPoint, WRAPJunctions), while number 02 is assigned for the edges
(WRAPFlowLine, WRAPEdge). The last five digits will describe the feature number
(entered initially as all zeroes). Click Close.
• In the ArcHydro tools, open Attribute Tools / Assign HydroID.
• Highlight the layers WRAPJunction and WRAPEdge in the Layers box and select Yes to
Overwrite existing HydroID. Apply it to All features and click OK.
119
5.4.7 Determine NextDownID
Objective: Determine the Next Downstream ID for every WRAPJunction
• In the ArcHydro tools, open Attribute Tools / Find Next Downstream Junction.
• Select WRAPJunction in the Layers box as the HydroJunction input and the HydroID as
the common field for all junctions in the network. This field will be used to assign
NextDownID for the junctions. Select No for spatially coincident junctions and click OK.
120
• If the HydroID option does not appear as the common field, add the
WRAPNetwork_Junctions feature class from the WRAPHydro feature dataset to your
ArcMap document.
• Assign HydroIDs for the WRAPNetwork_Junctions feature class. Do not worry about the
regional HydroIDs for this step (all we need is to have the HydroID column in the attribute
table).
• Remove the WRAPNetwork_Junctions feature class from your document and try again to
calculate the NextDownID for the WRAPJunctions.
• The NextDownID field of the WRAPJunction attribute table has been populated. This value
points to the HydroID of the NextDownID in the stream network.
121
5.4.8 Calculate LengthDown
Objective: Calculate the length to outlet of every WRAPJunction
• In the ArcHydro toolset, select Attribute Tools / Calculate Length Downstream for
Junctions.
• Choose WRAPJunction as the HydroJunction. Select the Shape_Length field for
WRAPEdge. Click OK.
122
• The LengthDown field of the WRAPJunction attribute table has been populated with the
distance (in meters) to the outlet of the stream network.
5.4.9 Assign JunctionIDs
Objective: Assign JunctionIDs to WRAPEdge
• Open the WRAPEdge attribute table and add the field JunctionID (long integer).
• Close the attribute table and go to WRAPHydro Tools / Settings.
• Click the Layers tab and select WRAPJunction (WRAPJunction layer), WRAPEdge
(HydroEdge layer), None (Watershed layer) and SnapControlPoint (Control Point layer).
123
• Click the Fields tab. For the WRAPJunction fields, select HydroID (for HydroID),
NextDownID (for NextDownID), AvgCN (for Curve Number), AvgPr (for Precipitation),
and DrainageArea (for DrainageArea).
• For the Control Point fields, select HydroID (for CP ID) and JunctionID (for JunctionID).
Use the same names for the remaining fields as for the WRAPJunction layer.
• For the HydroEdge field, select JunctionID (for JunctionID). Click OK.
• Make sure no features are selected.
• In the WRAPHydro tools, select Advanced Tools / IDs to Edges.
• Click OK when given the reminder that flow direction must be set.
• Click Yes to assign IDs for all features.
124
All of the edges between two junctions now have the same JunctionID (which is the HydroID of
the downstream junction).
125
5.4.10 Delineate the upstream area for each WRAPJunction
Objective: Delineate the upstream area for each WRAPJunction using WRAPEdge and WRAPfdr
Once all the JunctionIDs are populated, the Delineate Watersheds Tool in the WRAPHydro
toolset is used to delineate watersheds for each junction. The watersheds are delineated using the
WRAPFdr flow direction grid and the WRAPEdges as the outlet zones. The output is called
WRAPWatershed. For each value of JunctionID of the edges, a watershed is created. Thus, a
watershed is created for each Junction, since all the edges between two junctions have the same
JunctionIDs. The DrainID field in the WRAPWatershed is populated with the JunctionID value
of the Edges it drains to. Thus, each WRAPWatershed is already attributed with the HydroID of
its outlet junction.
• Go to WRAPHydro Tools / Settings.
• Click the Layers tab and select WRAPfdr for the Flow Direction Raster field. Leave the
Curve Number Raster and Precipitation Raster fields as None.
126
• Click the Options tab.
• In the Watershed Delineation section, select WRAPEdge as the Source Layer and
JunctionID as the Source Attribute. Select Square Kilometers as the Desired Units in the
Drainage Area Units section. Click OK.
• In the WRAPHydro toolset, go to Advanced Tools / Delineate Watersheds.
• Save the output watersheds as WRAPWatershed in the WRAPHydro feature dataset.
127
One WRAPWatershed has now been delineated for each WRAPJunction.
128
5.4.11 Calculate the Area, CN and Precip for each WRAPWatershed
Objective: Calculate the Watershed Drainage Area, Average Curve Number and Average
precipitation for each WRAPWatershed
These values are populated in the DrainArea, AvgCN and AvgPR fields in the
WRAPWatershed feature. The average value of Curve Number and Annual Precipitation for
each Watershed is the mean of all the cell values within that area.
• Go to WRAPHydro Tools / Settings.
• Click the Layers tab and make sure that WRAPWatershed appears as the Watershed layer.
• Click the Fields tab and make sure that all of the fields for Watershed are filled in.
• Click the Options tab and verify that the Drainage Area Units are in Square Kilometers.
Click OK to close the Settings form.
129
• In the WRAPHydro toolset, select Advanced Tools / Watershed Drainage Area. This
procedure calculates the drainage area for each WRAPWatershed.
The DrainArea field of the WRAPWatershed feature class has been populated.
• In the WRAPHydro toolset, select Advanced Tools / Watershed CN and Precip (only
applies if you have those rasters).
The AvgCN and AvgPR fields of the WRAPWatershed feature class have been populated.
130
5.4.12 Consolidate Area, Curve Number, and Precip for each WRAPJunction
Objective: Consolidate the Watershed Drain Area, Average Curve Number, and Average
Precipitation for each WRAPJunction
• Copy the DrainID values to the JunctionID field in the WRAPWatershed feature class
using the field calculator.
Once the incremental values for the drain area, curve number and annual precipitation have been
determined for each feature in WRAPWatershed, these values are consolidated to add in the
effects of all the area that is upstream of each junction.
• In the WRAPHydro toolset, select Advanced Tools / Accumulate CN, Precip and Area.
131
A message will appear listing which parameters were successfully calculated when the tool
finishes.
The drain area values were added downstream and were stored in the DrainageArea field in the
WRAPJunction attribute table. The curve number and precipitation values were populated in the
AvgCN and AvgPR fields by taking a weighted average of the respective values over each
watershed (if this data is available for processing).
132
5.4.13 Assign JunctionID to SnapControlPoint.
Objective: The last step in parameter development is to copy the attributes from WRAPJunction
to all the points including the coincident ones in the ControlPoint feature class
• Go to WRAPHydro Tools / Settings.
• Click the Layers tab and make sure that SnapControlPoint appears as the Control Point
layer.
• Click the Fields tab and make sure that all of the fields for WRAPJunction and Control
Point are filled in. Click OK.
• Go to WRAPHydro Tools / CP Tools / IDs to Control Points.
Each SnapControlPoint now is attributed with the HydroID of the WRAPJunction that lies
directly underneath it (NOT downstream, but underneath the same point).
Ultimately, the features in the ControlPoint need to be associated with WRAPJunctions. The
SnapControlPoint from the previous step is used because it is easier to locate the correct
WRAPJunction from features that are spatially coincident with them. Next, we assign
JunctionID values to the corresponding ControlPoints, which are not necessarily spatially
coincident with WRAPJunctions.
Each SnapControlPoint and ControlPoint is attributed with a value called WRAPCode. This
value is the same for corresponding features between the two feature classes.
133
• Right click on the ControlPoint feature layer and create a new join with the
SnapControlPoint layer.
• Base the join on the WRAPCode layer and choose the SnapControlPoint table to join to the
layer. Use WRAPCode as the field in the table to base the join on. Click OK.
134
• Once the join has been created, open the ControlPoint attribute table.
• Copy the JunctionID values from the SnapControlPoint feature class to the ControlPoint
feature class using the field calculator. Click OK and close the attribute table.
• Right click on the ControlPoint layer / Joins and Relates / Remove Join(s) / Remove All
Joins to remove joins.
135
5.4.14 Copy parameters from WRAPJunction to ControlPoint.
There now exists one too many relationships between WRAPJunction and ControlPoint. The
“Params to Control Points” tool is used to copy the attributes to ControlPoint. For each match of
HydroID in WRAPJunction with JunctionID in ControlPoint, the respective attributes for
Drain_Area, AvgCN and AvgPR values are copied to ControlPoint.
• Go to WRAPHydro Tools / Settings.
• Click the Layers tab and make sure that ControlPoint is now the Control Point layer (not
SnapControlPoint).
• Click the Fields tab and make sure that all of the fields for WRAPJunction and Control
Point are filled in. Click OK.
One of the parameters required by WRAP is the NextDownID for Control Points. Before the
WRAPHydro tools can calculate this value, we must assign HydroIDs to ControlPoints in case
they do not exist yet.
• Go to the ArcHydro tools and click on Attribute Tools / Assign HydroID.
136
• Select the ControlPoint feature class and click Yes to overwrite existing HydroIDs. Click
OK.
Note that own ID can be used, instead of HydroID, as the ControlPoint identifier. To do so,
simply change the HydroID field (and perhaps the NextDownID field) for the Control Point layer
in the Settings form of the WRAPHydro tools.
• Go to the WRAPHydro Tools and click on CP Tools / Params to Control Points.
Finally the Control Point feature class parameters have been populated!!!
137
References
Asamenaw, S.A. and D.C. McKinney, ArcHydro Data Model for Ethiopian Watersheds, The
University of Texas at Austin, Center for Research in Water Resources Online Report
No. 2005-06, 2005
Csillag, F., 1996, Variation on hierarchies: toward linking and integrating structures, in
Goodchild, M.F. et al (Eds.), GIS and Environmental Modeling: Progress and Research
Issues, GIS World Publication, Fort Collins, CO, pp. 433-437
Goodchild, M.F., 1993, Data models and data quality: problems and prospects, in Goodchild,
M. F., Parks, B.O., Steyaert, L.T., (Eds.), Environmental Modeling with GIS, Oxford
University Press, New York, pp 8-15
Gopalan, H. and D.R. Maidment, WRAPHydro Data Model: Finding Input Parameters for the
Water Rights Analysis Package, The University of Texas at Austin, Center for Research
in Water Resources Online Report No. 2003-03, 2003
(http://www.crwr.utexas.edu/reports/2003/rpt03-3.shtml)
Maidment, D.R., 2002. ArcHydro: GIS for Water Resources, ESRI Press, Redlands
Patino, C., D. C. McKinney, and D. R. Maidment, Development of a Hydrologic Geodatabase
for the Rio Grande/Bravo Basin, AWRA Spring Specialty Conference: Geographic
Information Systems (GIS) and Water Resources III, Nashville, TN, May 17-19, 2004
Patiño-Gomez, C. and D.C. McKinney, GIS for Large-Scale Watershed Observational Data
Model, The University of Texas at Austin, Center for Research in Water Resources
Online Report No. 2005-05, 2005 (http://www.crwr.utexas.edu/reports/2005/rpt05-
5.shtml)
Wurbs, R.A., and Dunn, D.D., Water Rights Analysis Package (WRAP) Model Description and
Users Manual, Texas A&M University, College Station, October, 1996