Applying the ArcGIS Hydro Data Model: Part 3

 

CE 394K GIS in Water Resources

University of Texas at Austin

 

Prepared by: Tim Whiteaker and David Maidment

 

Covered in Part 1

·        Introduction to the ArcGIS Hydro Data Model and Arc Hydro Framework

·        Objectives of the Exercise

·        Computer and Data Requirements

·        Procedure for the Assignment

1.      View your data in ArcMap and ArcCatalog

2.      Prepare your Data for Schema Application

A.     Create Centerline

B.     Create Waterbody

C.     Create Network Junctions

D.     Create Geodatabase and Import Data

E.      Create Geometric Network

Covered in Part 2

3.      Applying the Schema

A.     Add Schema Creation Wizard to ArcCatalog

B.     Connect to the Repository

C.     Selecting Features

D.     Set Properties of Feature Classes

E.      Create the Schema

4.      Applying Tools

A.     Add the Arc Hydro tools to ArcMap

B.     Apply the Arc Hydro tools

I.                    Assign HydroID

II.                 Calculate Length Downstream

III.               Find Next Downstream Junction

IV.              Store Area Outlets

V.                 Consolidate Attributes

VI.              Store Flow Direction

Covered in Part 3

5.      Applying the FrameworkWithTimeSeries Schema

6.      Retrieving Time Series Data

A.      Loading the NWIS tool into ArcMap

B.      Using the NWIS tool

 

This portion of the Arc Hydro exercise extends the Arc Hydro geodatabase to support time series data.  This portion assumes that you have already prepared data and applied the ArcHydroFrameworkSchema as described in the previous portions of the exercise.  The attached zip file, ArcHydroPart3.zip, serves as a point of departure for this portion of the exercise.

 

The files included in ArcHydroPart3.zip are:

FrameworkWithTimeSeriesSchema.mdb: the framework schema with time series classes

ArcHydroAfterTools.mdb: the geodatabase after schema and Arc Hydro tools have been applied

Nwis.zip: zip file containing NWIS dll and documentation (source files and additional sample data are included for your benefit, but are not required for this exercise)

ArcHydroAfterNWIS.mdb: the geodatabase after the NWIS tool has been applied

 

 

5. Applying the FrameworkWithTimeSeries Schema

 

In this portion of the exercise, we will retrieve time series data from the Internet and store that data in our Arc Hydro geodatabase.  First, we need to prepare our geodatabase to store the time series data.  We will do this by applying the FrameworkWithTimeSeries Schema, which contains the same structure as the ArcHydroFrameworkSchema, but with the addition of time series classes and relationships.  We will use the ArcHydroAfterTools geodatabase for this exercise. 

 

(1)   Close all instances of ArcMap that contain data from our Arc Hydro geodatabase.  This is required to free up the geodatabase for editing by ArcCatalog.

(2)   Open ArcCatalog.

(3)   Click the Schema Creation Wizard and apply the FrameworkWithTimeSeriesSchema schema, using the same procedure from Part 2 of the exercise, to the ArcHydroAfterTools geodatabase.  Note that most of the classes and relationships in this schema already exist in the geodatabase, but that two new time series classes (TimeSeries and TSType) and their relationships will be added from the schema.

 

 

When the schema creation wizard is finished, the geodatabase will contain the same structure as before but with the addition of the Arc Hydro time series classes. 

 

 

The TimeSeries table stores the time/value pairs of time series data, while the TSType table stores descriptive information about the categories of time series data stored in the TimeSeries table.

 

6. Retrieving Time Series Data

 

For this exercise, we will retrieve daily streamflow data from the USGS National Water Information System (NWIS).  Normally, one can retrieve the data by going to the USGS web page and navigating through various web pages.  But for this exercise, we will retrieve the data automatically from within an ArcMap application, without ever having to open up a web browser.  We will do this with the NWIS tool.

 

 

 

A.  Loading the NWIS tool into ArcMap

 

1.            Close ArcCatalog.

2.            Open ArcMap.  From our Arc Hydro geodatabase, add the MonitoringPoint feature class to ArcMap.  Open the attribute table for MonitoringPoint.  Note that the USGSID field contains USGS gage numbers.  Each number is a universal index that uniquely identifies each USGS stream gage.

 

 

3.            Extract NWIS.dll from the Nwis.zip file included with this exercise (attached in ArcHydroPart3.zip).

4.            Click Tools/Customize.  Click the Commands tab in the Customize window, and then click Add from file.

 

 

5.            Navigate to NWIS.dll, and click Open.  A window appears showing that clsNWIS was added.  Click OK. 

 

 

If necessary, click on ‘NWIS’ in the Categories pane of the Customize window.  The Get NWIS Data command appears in the Commands pane.  To add this button to ArcMap, click on ‘Get NWIS Data’ with the left mouse button.  While holding down the left mouse button, drag the Get NWIS Data button next to another button in the gray area where all the commands and tools are in ArcMap.  When you see the insertion cursor (looks like a capital I,) that means that tool can be placed in that location.  Release the left mouse button to drop the tool in that location.  Then close the Customize window.  The Get NWIS Data button is now ready for use.

 

 

 

 

 

B.  Using the NWIS Tool

 

6.            Click Get NWIS Data.  In the NWIS Data Retrieval window, select MonitoringPoint as the layer, USGSID as the USGS Site Number field, and HydroID as the Feature ID field.  Then click OK.

7.            Enter a period of record to retrieve (you can accept the default for this exercise). 

8.            In the Select Table dialog box, choose the TimeSeries table from our Arc Hydro geodatabase and click Save.  This is the table where we will store the USGS time series data.

9.            Input 1 as the TSTypeID.  The TSTypeID identifies categories of time series data, e.g. rainfall data might have a TSTypeiD of 3, while streamflow data might have a TSTypeID of 1.  The TSTypeID will link each time series record to a row in the TSType table, which provides descriptive information about categories of time series data.

 

The tool will now go to the NWIS web site and attempt to retrieve the requested time series data.  The tool ignores IDs for which no USGS gage exists.  If the available data on the USGS web site isn’t sufficient to cover the entire period of record requested by the user, the tool will only retrieve the available data from the web site.  When the tool is finished, a message box appears providing some information about the tool’s processing time. 

 

10.        In the ArcMap table of contents, note that the TimeSeries and TSType tables have been added to the map document.  Open these tables and inspect the data.  They should look like this:

 

 

Note how the TSType table describes the time series data as Daily Streamflow, in units of cfs, at regular intervals, etc.

 

Congratulations!  You have now completed this portion of the exercise.