The NHD for the Trinity River Basin: Appending CUs and Linear Addressing

By Kristina Schneider

CE 394K.3 - GIS in Water Resources
University of Texas at Austin


Table of Contents

Introduction

The National Hydrography Dataset

The Append Aml

Linear Referencing

Summary

References

Special Thanks

Introduction

         When the National Hydrograph Dataset (NHD) was released last year a more integrated way to look at the hydrologic features of the United States emerged.  This study looks into two specific features of the NHD, the Append Aml  and linear addressing.  Append Aml, provided by the makers of the NHD, allows for the combination of multiple workspaces of the NHDinARC, as NHD information presented in the ARC/INFO format is called. Linear referencing answers the question: Where are we on the River? The linear referencing system devised by the creators of the NHD  and the utilization of Route Events, a capability of ArcInfo 8.1, will be explored.  The original subject area for the study was the Trinity River Basin as shown below, but it was decided that a subject area this large was unnecessary.

 

 

Therefore, the HUC units 12030201 and 12030202 were chosen as the focus area based on the needs of the Append Aml and the desire to explore the linear address of two points of interest. The graphic below shows the river system of the Trinity Basin color coded by HUC unit. 

 

 

Back to the Table of Contents

 

The National Hydrography Dataset

         The National Hydrography Dataset  is a national set of standardized data for hydrography (the mapping  of rivers) developed by the EPA and the United States Geological Survey (USGS). The NHD incorporates the EPA's River Reach File 3 system and the Digital Line Graph hydrography data from the USGS.  It catalogs the hydrographic features found on USGS topographic maps at 1:100,000 scale and is at the same time also a data model. The NHD describes naturally occurring and constructed bodies of water and their paths.  The organization of the NHD river system is broken up into two components, features and reaches, with each element having unique common identifier.

        Features represent hydrographic elements such as paths through water flows and bodies of water.  They are each classified by a specific Feature Type, which has its own unique Feature Code.  Features can be either points, lines, or areas. An example of a point, line, or area feature respectively is a gaging point, a stream/river, or a lake/pond.  Groups of features then form reaches. Reaches are composed of hydrographic entities which have similar hydrologic characteristics.  Each reach also has a unique identifying reach code. Three types of reaches exist: transport reaches, coastline reaches, and waterbody reaches. Transport reaches represent the conveyance of water through the river network. Coastline reaches are located along the major coastlines of the United States and they allow for the storage of information necessary to coastlines. Waterbody reaches consist of more than one waterbody region that allows for the relation of additional information to the waterbody. The reaches provide a basis for linking water related data to the drainage network. This is accomplished by using flow relationships, which relate individual transport and coastline reaches to each other. 

        There are three Arc Info coverages used to store the spatial data provided by the NHDinARC.  The NHD coverage contains nodes, lines, and polygons which create the network topology. Also, this coverage contains all the feature and reach classes.  Point features are contained in NHDPT because the ARC/INFO data model does not allow points to be in the same coverage as polygon features. The NHDDUU coverage contains metadata information for the workspace. The table below describes organization of the data available through NHD.

Spatial Data Set

Contents

Feature Attribute Table

Coverage: NHD

Route DRAIN

Network Element Theme

NHD.RATDRAIN

Route RCH

Transport and Coastline Reach Theme

NHD.RATRCH

Route LM

Line Landmark Theme

NHD.RATLM

Region WB

Waterbody Theme

NHD.PATWB

Region RCH

Waterbody Reach Theme

NHD.PATRCH

Region LM

Area Landmark Theme

NHD.PATLM

Nodes

NHD underpass features exist on some nodes

NHD.NAT

Coverage: NHDPT

Points

Point Landmark Theme

NHDPT.PAT

Coverage: NHDDUU

Region.dom

Digital Update Unit Theme

NHDDUU.PATDOM

Source : "Introducing the NHDinARC." 27 November, 2000.  http://nhd.usgs.gov/chapter2/index.html

        When data from the NHD is downloaded, it is in a compressed format. The information is provided in a workspace that contains all three coverages described above as well as some INFO data tables and some informational text files. Each workspace covers one 8-digit HUC unit. This is a convenient method to present data and convey it since the information in the workspace is interrelated and dependent on one another. The image below shows a screen shot of the NHD data acquisition web page zoomed into the CUs used in this study.

 

 

Back to the Table of Contents

 

The Append AML

 

Background

        Aml stands for Arc Macro Language. Macros are used in GIS as they are used in any other program, to simplify processing and to perform calculations and other activities that would otherwise be too time consuming.   The Append_NHD version 2.10 does exactly this. It simplifies the connection and integration of adjacent NHD workspaces.  As mentioned above, the NHDinArc presents data for each 8-digit Cataloging Units (CUs) created by the USGS. However, it is sometimes necessary or desirable to deal with data on a larger scale, such as run a network trace for an entire watershed and not just one HUC unit.  

        Append_NHD combines the CUs into a single workspace, while insuring the reliability of the data. It can combine up to 500 NHDinArc workspaces into a single workspace. Append_NHD is a macro written by the providers of the NHD.  It is very useful because it integrates the workspaces which are very complex. Also, adjacent CUs often contain duplicate information.  When aerial stream/river features are along the CU boundaries they are often represented in both CUs.  Append_NHD finds these duplicates and makes sure that only one instance of the feature remains.   The question is however, what is the difference between the appended CUs and ones that are not appended.  To find if there is a difference,  HUC units 12030201 and 12030202 were selected to be appended. 

        The first step in properly using Append_NHD is to use the correct data. Of course one might wonder where one could get wrong data if we are using a macro especially designed for the NHD dataset. It is not a question of the source of the data but the manner in which the data is unzipped. The workspaces must be unzipped using either Winzip Version 8, or UNIX gzip and tar, or the gzip.exe and tar.exe DOS executables to uncompress and untar NHD data.  Winzip Version 7 does not uncompress files if they  have 0 bytes of information.  Append_NHD requires that the workspace being appended contain the basic set of NHD features classes, NHD feature attribute tables, and associated NHD tables that are described in the section above.  In certain HUC units many of the features are blank because information is not available or pertinent for  that workspace.  Therefore it is important to use the correct program to unzip the files. The image below shows Winzip v. 8 and two of the zero bite files that were decompressed.

 

 

        Another consideration in regards to the data is if the data is Flow Validated or Initial Release. After the initial release of the NHD it was noted that there existed some problems with the network conductivity in certain workspaces.  The NHD and NHD users are now correcting the problem and once the CUs are ready for re-release they are called Flow Validated. CUs  must either  be Initial Release or Flow Validated to be combined using Append.  The entire Trinity Basin has been Flow Validated and therefore is acceptable to append the chosen CUs.

Using the Append Aml

        To append the HUC units 12030201 and 12030202, the Append Aml was downloaded from the NHD website. Since Append is a macro, it runs in  ARC of the ARC/INFO Workstation. The first step is to create a text document that contains the locations of the CUs that will be appended. 

 

 

Then, you open ARC and create a workspace that contains the Append Aml. The workspace must be created so that ARC knows where  to read the program from. Once this is done the Append Aml macro is run.

 

 

                The command line for Append is 

                &run Append_NHD <Output Workspace> 

                <BROWSE <Input_List_File> : 

                BATCH Input_List_File>.

 

 

BROWSE allows you to interactively look at the specified directory with a menu driven interface. BATCH just tells Append to use the files listed in the input text file without interactively browsing. BATCH was always used in this study to save the time needed to browse the directory. Once the correct information is input the macro is then run.   The run time for Append is about 20 minutes for two CUs and about 45 minutes for 4 CUs. The image below shows the appended CUs.

 

 

A Comparison

        The question is, however, if there a difference between CUs that have been appended and ones that have not been appended. To see if there is a difference, a network was created using an appended workspace and the non- appended workspaces. The network was created in ArcInfo using the network features in ArcCatalog and ArcMap. Two Personal Geodatabase Feature Datasets were created with one containing the workspace created by Append and the other containing information from the original workspaces. Then the Geometric Network Wizard was used to create a network for each feature dataset using the route.drain polyline since it was found the simple edges in this theme allowed for a uncomplicated creation of  a network.

 

 

After the creation of the networks any loops that may have been present in the network were deactivated to allow for a complete trace of the network. The image below shows both of the created networks .

 

 

        It looks as if the networks created using the different workspaces are very similar. It seems as if they both have analogous segments that are disconnected from the network. These segments are disconnected because they are on disconnected reaches of the NHD or they were parts of loops that were disabled to allow a network trace. To make a complete comparison between the two networks the table below was created to compare the segments that were part of the network  and the segments that were traced. It can be seen that the only difference is that one more segment of route.drain was selected in the trace. This difference is minor and it can  be seen that networks created by the two workspaces are almost exactly the same.

Segments of route.drain Appended CUs Unappended CUs
Enabled (part of the network) 3890 3890
Traced 3830 3831
Total 3930 3930

        Using the Append Aml allows one to combine multiple NHDinARC workspaces. When a network trace was done it was seen that there is no real difference between networks created using Appended and Unappended CUs. It is  easier to work with  multiple CUs when they are appended because one does not have to remember to load all of the data associated with each CU. Also, one is assured that all the pertinent data is not duplicated. 

 

Back to the Table of Contents

 

Linear Referencing

 

Finding the Linear Address

        Often times when one has created a network the question arises, " Where am I on the river?" One may want to determine how far an event, such as a discharge from a waste water treatment plant, is from the outlet of the watershed. Another bit of information possibly needed would be how far the riverside development is located from a flood control dam. It is just like when you are looking at a road network and you are looking for the address of a specific building. So, to answer this question, "Where am I on the river?", an additional measure is added to the Cartesian (x, y) coordinates of the river. This measure is called the m-measure. Linear Referencing does require ArcInfo 8.1 and m-measures only appear on the polyline M geometry. To show the m-value for a polyline M the Edit toolbar must be used and the task option must be set to Modify Feature.

 

 

To see the m-measures of a selected polyline M, right click on the feature and click again on Properties.

 

 

 The image below shows some of the m-measures given to a segment in HUC 102030202. 

 

 

Measuring Systems

        What does the value actually mean that is shown in the column labeled M?  Well, M-value can be ascribed to a segment in multiple ways. One way is to use the Absolute Measuring system. This system attributes the actual distance of the segment to the parts of the reach. The other common measuring system uses a relative system. The m-value is prescribed depending on the percentage of the total distance of the segment that has been traveled. This system is called Relative Measure. The figure below gives a graphical representation of the definitions.

 

 

 

Linear Referencing on the NHD

        Linear referencing on the NHD is interesting because even though there are three route systems only one of the systems is linearly addressed. The reach system contains the addressing system of the NHD.  The drain and landmark routes, which have the polyline M geometry, have an M-value randomly assigned to them by ArcInfo. The measures on route.reach are assigned in an order that opposes the direction of the coordinates and are applied following the Relative Addressing scheme. There are three types of reaches, which each of their own methods of assigning the measure. Linear reaches are located in streams or a waterbody with only one in and out flow. Branched reaches appear in water bodies with two or more in and/or outflows. Discontinuous reaches occur in swamps or marshes. The image below illustrates addressing in the NHD.

 

 

Linear reaches have a relative measure assigned  to them that starts  with a value of 0 at the downstream end of the reach and extends to 100 at the upstream end of the reach. Discontinuous reaches, to distinguish them from linear reaches, have a measure from 100 to 200 applied in the same fashion as for linear reaches. Branched reaches use a methodology that combines the addressing used in linear and discontinuous branches. If there is a distinguishable main path, it is assigned values from 0 to 100 as for a linear reach. The branches are then given measures like those used for discontinuous reaches from 100 to 200.

 

Creating Route Events

        Route Events are occasions located along a route. To create a route event one must first decide on what one would like to symbolize with the route event. It was decided for this study to reference two rapids that are located on the Trinity River in the focus area. The image below shows the location of the points.

 

 

Once the points have been decided upon, the m-value for the points must be determined as described in the section entitled 'Finding the Linear Address.' Two other pieces of information that are important to note when creating the route events are the ID of the point and the ID of the reach/polyline M on which the events will be located. When working with the NHD these IDs are the Com_id and Rch_com_id respectively.  The next step is to then create a table in ArcCatalog with the information collected.

 

 

When creating the table it is easiest to import the fields that are used with the NHDPT coverage and then just edit the out the fields that are not needed and add the ones that are needed. Once the table is created, it is then added into the map that contains the reach on which the events shall be referenced to. The values, that were obtained earlier, are added using the Edit Toolbar. Once the table is created and the values inputted, it is time to Display the Route Events.  Simply right click on the table and select Display Route Events. Select the correct entry for each field and press OK. 

 

 

The Route Events will appear on the map.

 

 

However, the question is did the route events appear at the correct location and  the image below was created to verify this. It is clear that the Route Events appeared at the correct locations.

 

 

        Using the Display Route Events command is a great way to verify the location of points already located on or near a river reach. Another possibility is to use Route Events to show the location of the middle or quarter markers of  a reach.  One draw back is that the location of the Event must be known in order to display it. To find the location of a point it is still best to use the Edit toolbar and determine the location manually.

 

Back to the Table of Contents

Summary

        One of the main objectives of this project was to implement the Append Aml macro.  This goal was achieved.  Although it was found  that use of the Append Aml depends on the methods used to decompress the files obtained from the NHD. With the files decompressed in the correct manner the implementation of the function is quite smooth. It was also found that there was no significant difference between networks created by the appended and unappended CUs. However, this may only be because of the CUs chosen to be appended in this study. The Append macro did make it easier to work with multiple cataloging units. 

        Linear Addressing on a route can be accomplished by using the polyline M geometry and assigning a m-value, which indicated the location on the polyline, in addition to the Cartesian ordinates  x and y. Linear referencing is a function of the ArcInfo 8.1 program. The Edit menu within this program allows for the determination of m-value if it is already assigned.  The NHD has assigned a relative measure scheme to its reach route system. Any measures determined from the other two route systems, landmark and drain, are not valid.  Also, the NHD uses a different addressing schema for linear, discontinuous, and branched reaches. It is important to keep in mind these methodologies when determining the "address" of a point on the NHD. Finally, the Display Route Event was used to create a layer that contained locations on a measure. Route Events are useful in displaying events for which the location has already been determined.   

Back to the Table of Contents

 

References

 

NHD Internet site: http://nhd.usgs.gov

"Introducing the NHDinARC."  http://nhd.usgs.gov/chapter2/index.html

"NHDinARC QuickStart." http://nhd.usgs.gov/quickstart.html

"Concepts and Contents" http://nhd.usgs.gov/chapter1/index.html

"Append_NHD" http://nhd.usgs.gov/tools.html#append

 

Special Thanks

Dr. Maidment

All the 2nd year CRWR students (for answering all my little questions).

My Editor

 

 

BACK TO MY HOMEPAGE