Term Project

CE 397 GIS in Water Resources
University of Texas at Austin

Building a River Base Map and Model for BALANCE Analysis

by Mark C. Graves


  • Introduction
  • This project was initially conceived to analyze point source pollution in rivers using Balance -Map Based Surface Water Quality Model written by Ferdinand Hellweger. I choose the lower Aransas River as my study site because there has been a considerable amount of GIS work done within the region of this river under the Corpus Christi Bay National Estuary Program part of which has been done at The University of Texas. The program Balance was written for the UT project Estimation of Total Constituent Loadings to the Corpus Christi Bay System. As the name suggests this is a project designed to analyze bay loadings and Balance has been written accordingly. The vast majority of work done on this project to date has been to analyze the complex affects of nonpoint source pollution coming into the bay directly and through the numerous rivers flowing into the bay. Due to the amount and availability of nonpoint source pollution estimations, this project was altered to incorporate nonpoint source pollution in the analysis. The majority of this data was obtained from the thesis of William Saunders entitled A GIS Assessment of Nonpoint Source Pollution in the San Antonio - Nueces Coastal Basin. USGS water quality measurement data at the upstream end of the analysis area was used as a point source and nonpoint source pollution was added along the river. The down river water quality measurement data was used as verification for the model.

  • Motivation
  • My major within the Environmental and Water Resources department is in treatment processes. A factor to be considered in treatment processes is gaining a pollution discharge permit to discharge into a receiving body of water, often a river. An obvious consideration in this process is what will be the effect on a receiving river, what will be the resulting pollution concentration in the river? This is generally not an easy question to answer due to the many factors involved in a natural system. Using GIS and a program such as BALANCE, it is possible to create a model of the constituent loads in a river. Once an accurate model is created which takes into account existing point sources and non-point sources of pollution as well as factors such as pollution decay, the effect of additional point source loads could be assessed. A good model would be capable of dynamically assessing different scenarios to avoid potential problems.

    Figure 1. Aransas River Study Site.

  • Develop a Base Map
  • I developed a base map of the study area as a necessary component for the creation of the balance model and for the purposes of nonpoint source pollution analysis. Most of the data used in this base map is available through the Internet at various sites which I have included in Appendix A. Much of this data requires processing before it can be utilized by Arc/Info and ArcView. The methods for obtaining this information and processing it have been documented in Ann Quenzer's term project Completing a Base Map for a Geographic Information System (GIS) Assessment of Nonpoint Source Pollution for the Corpus Christi Bay National Estuary Program (CCBNEP). I obtained some of the data used in this analysis from a database established for CE 397 GIS in Water Resources (Spring 1996). The data was made available for use in Exercise 5: Nonpoint Source Pollution. Instructions are given for copying the data files used in this analysis. The location of these files is different now from the location sited in this exercise. The files which I used and the commands used to obtain them are given below:

    The Hydrologic Unit Codes for Texas were obtained from the anonymous ftp server at the Center for Research in Water Resources. The address is ftp.crwr.utexas under the directory pub/gisclass/ex4. The file name is huctx.

    I will not detail the steps required for building a base map for non-point source pollution. This process has been well documented in the above sources. The steps required to process the base map to determine the non-point source pollution accumulation in a stream can be found in Exercise 7: Nonpoint Source Pollution in the Mission Basin. This report will cover only the steps necessary for isolating the study area and bringing the information into BALANCE for analysis.

    The Coverages used in this analysis have all been projected to an ALBERS projection used in the Texas State Mapping System. The projection characteristics are listed here.

    The file huctx is an Arc coverage from the US Geological Survey so it does not need to be altered for analysis. This file will serve to define the drainage area for the study area. I will also use the selected HUC for the Aransas River as a cookie cutter to reduce other files to only the study area.

    The Hydrologic Unit Code representing the drainage area of the Aransas river is the only HUC needed for this analysis. The HUC code representing this region can be found in ArcView using the identification tool and clicking on the region representing the Aransas River drainage area.

    Figure 2. Aransas River Basin Hydrologic Unit Code

    The required HUC for this analysis is HUC = 12100407. This HUC could be selected in ArcView and converted to a shapefile to create a theme which only contains the needed HUC. The procedure to accomplish this would be to select the huctx theme in the view. In the legend bar at the top of the screen select Theme then Properties. Under Properties select the hammer icon to open the Query Builder. Make a query of [huc] = 12100407. To complete the query select OK in the Query Builder and Theme Property windows. In the Legend bar select Theme and then Convert to Shapefile to make a theme consisting of only this HUC. For this project the selected HUC is going to be used to reduce other files by creating a buffer around the huc boundary. This operation is performed in Arc/Info and requires that the file to be operated on is a coverage not a Shapefile. For this reason I selected the Aransas HUC in Arc/Info using the following command.

    This creates a coverage called hucaran containing only the Aransas HUC .

    The Aransas River Hydrologic Unit Code can be used to reduce the other coverages to just the study area. A buffered HUC can be created to ensure that when the HUC is used to reduce other coverages to the study site no necessary information on the borders is lost. The buffer command can be used to create a coverage which is extended 5000 meters around the perimeter.

  • Isolate Study Stream
  • A 100,000-Scale Digital Line Graph coverage is used as the Basis for creating the model. The Lower Aransas River needs to be separated from the streams Digital Line Graph coverage for the creation of a Balance river model. The USGS Digital Line Graph is divided into many line segments each with an individual Stream # identifying the segment. The segment corresponding to the Lower Aransas river was determined by bringing up the streams Attribute Table and clicking on the records. The highlighted record had a corresponding highlighted stream segment and this process was used to locate the desired segment. The Lower Aransas River has a stream number of 327 associated with its line segment. In the Legend bar Theme/Properties is selected and then the hammer icon pressed to bring up the query builder. A query is built for (stream # = 327). The query is activated by clicking OK in the query builder and properties windows. The isolated stream segment is then converted to a shapefile using Theme/Convert to Shapefile. The shapefile is saved as arstrm.shp and added to the view.

  • Water Quality Testing Sites
  • The two TNRCC Water Quality Measurement Locations on the Lower Aransas River form the borders of the model area. These monitoring stations measure various combinations of 107 different water quality parameters. The data for these test sites consist of water quality data measured over a ten year period (1982-1992) (Saunders, 1996). The parameter of interest for this study is Total Phosphorus. The upstream test site (northern light green spot on the lower aransas river) has a Total Phosphorus measurement of 0.5 mg/l. The downstream test site has a Total Phosphorus measurement of .28 mg/l. There is obviously some phosphorus decay occurring between these two points on the river. This could be due to biological assimilation or other factors. Decay can be accounted for in the BALANCE model by applying a decay coefficient to constituent calculations.

  • Balance Model Format
  • The BALANCE program requires two themes for calculations. A polygon theme which has a global polygon encompassing the entire theme with individual polygons inside the larger polygon. The polygon theme needs to have an attribute table associated with it which has an identifying field were each polygon is labeled with a number. The second theme required is a line theme. The line theme must have an attribute table with fields identifying the left and right polygons which the line divides. Arc/Info creates the required tables for each theme when the polygon and line attributes of a coverage are created with the build command. There are other fields required for the constituent mass balance calculations, but BALANCE prompts the user that these fields are not present and automatically adds them.

  • Buffer Stream to Create Global Polygon
  • The created shapefile is then processed in Arc/Info to produce a global polygon from which to make the Balance model. First the shapefile must converted back to a coverage.

    This creates a coverage of just the lower Aransas River line segment called arstr. This coverage is then buffered to create a polygon representing the river. The format used with the buffer command can be examined.

    The use of # acts as a place holder to skip optional arguments in Arc/Info. A buffer of 50 meters is used to create a coverage with a polygon 100 meters wide called arstrb. The 100 m width for the stream polygons was chosen for visual purposes. An actual river 100 meters wide would be an extremely large river with a width greater than a football field. The actual width of the Lower Aransas River is probably closer to 10 m. BALANCE does not actually calculate with the area of each polygon so it is not important that this area be the actual area. When the volume is calculated and input for use by BALANCE this area can be divided by 10 to give a more realistic volume. The results of the buffer operation can be viewed in ArcPlot.

    A polygon attribute table (PAT) is created by Arc/Info when the buffer command is executed. The attributes of this table and its contents can be viewed in ArcPlot.

    The Item INSIDE is a code created by the BUFFER command which separates the polygons created into two categories : those inside the buffer zone have ITEM = 100 and those outside have ITEM = 1. Some of these attributes will need to be modified in ArcView before Balance operation.

  • Create Interior Polygons for Balance Model
  • The global polygon enclosing the study stream has been created and now the interior polygons used by Balance to analyze load transfer need to be created. ArcEdit can be used to manually create these polygons using the mouse and the global polygon. An alternate method for creating these polygons is to digitize them in AutoCAD or Arc/Info. The facilities at the Civil Engineering Learning Resource Center(LRC) do not have a digitizer set up for operation with ArcEdit so it is necessary to digitize in AutoCAD and then export into Arc. A good source of information on how accomplish this in the LRC is Exercise on Digitizing Coverages in AutoCAD and Arc/Info. For this study the polygons will be created manually in ArcEdit.

    Bring up ArcEdit and display the global polygon.

    This brings up a display of the global polygon with the drawing environment consisting of arcs, nodes, and node errors. The edit feature has been set to arcs. ArcEdit only edits one feature at a time. Whenever a different feature of the coverage is to be edited the EF command must be used to switch to that feature. Arcs are going to be drawn to divide the global polygon into 10 polygons for Balance analysis. The arcs need to be drawn with a node connecting each end of the arc to opposite sides of the polygon. When these nodes are entered they must intersect directly with the outer arc. This is very hard to do in the drawing environment without zooming in very close to the target arc. To facilitate easy node-arc intersections at a convenient viewing distance the ARCSNAP command will be used.

    There are two ways to use ARCSNAP. The tolerance can be set by entering a distance directly in the command line or by setting a comfortable distance using the mouse on the display. For this analysis ARCSNAP was set using the display. Pan/Zoom in the top left corner of the display is used to zoom in on the global polygon to a distance were two polygon dividing arcs will be visible when entered. The command option * is used to enter a tolerance circle within which the nodes can be set and then snap to the intersecting arc. Click on a line and then click on a point a distance away from the line at which it will be easy to get within that distance when setting points to intersect with the line.

    The dividing arcs can now be set with a minimal chance that node errors will occur. Bring up the add menu for entering arcs.

    The first two lines to be added will be the points on the river corresponding to the water quality testing sites on the lower Aransas River. These lines will form the boundary of the study area. The center mouse button is the default button for entering a node. Position the arrow over the desired point for the first node and click the center mouse button to place a node. When the cursor is then moved a line will be bound to the first node. Move the cursor over to the line opposite the first node. Click the center mouse button while the cursor is over the point on the other line to place another node and form a line across the polygon. If the cursor is not exactly over the line ,but within the tolerance circle from the line, the node will automatically snap to the line. If the cursor is over a point outside the tolerance distance a node error will be displayed at the point signified by a square around the point. If this occurs the error can be corrected in one of two ways depending on whether the line crosses the target line (overshoot) or falls short of the target line (undershoot).

    The downstream border can be entered at the location of the second water quality testing site. The resulting stream segment is then divided into ten roughly equal segments by adding lines across the polygon in the previous manner.

    Press 9 to quit from the add operation.

    After the arcs have been added which will form the polygon separators, Arc/Info needs to be told which polygons are to be built. This is accomplished by adding polygon labels inside the polygons formed by the arcs. Polygon labels need to be added to the drawing environment.

    This makes the drawing environment include arcs and polygon labels and sets the edit feature to polygon labels. When the new environment is drawn there is one cross hair in the center of the global polygon. This is the single polygon label which has been created in this coverage. Labels need to be added inside each of the polygons outlined by the arcs which have been added.

    The labels can be added by positioning the cursor in the middle of each of the ten polygons and pressing 1 to add a labile. Each label will be assigned a User-ID starting with 1 for the first label entered and continuing to 10 for the last polygon labile. The global polygon has a User-ID of zero.

    Save the coverage under a different name in case there are mistakes in the added features.

    Build Stream Features

    After the lines have been added across the global polygon and labels added inside each polygon, the coverage features can be built to create a PAT (point attribute or polygon attribute table). This is accomplished in Arc. First the coverage is cleaned to form intersections and polygons. Then the features are built. The default attribute for the build command is polygons. The line and node features also need to be built so that attribute tables will be created and the features can be added to arcview as separate themes.

    The resulting coverage can then be seen in arcedit. The extra polygons on the ends will not be used in the balance analysis and should be selected and deleted. The final coverage can be seen by clicking on Figure 7.

      Figure 7. Coverage with stream features.

  • Start Balance
  • The created stream polygon model can now be brought into BALANCE for analysis. Instructions on how to obtain the BALANCE program and operating features can be found in Ferdi Hellweger's paper Balance -Map Based Surface Water Quality Model. The balance program is opened in ArcView as the project file balance.apr. The three themes created in Arc/Info can then be added to a view.

    Open a new view and click the add icon on the toolbar to bring up a list of available files. Make sure the Data Source Type is Feature Data Sources. The coverages created in Arc/Info are in the str2 folder. Click on this folder and add the three files which appear as separate themes: node, arc, and polygons.

    The attribute tables for these themes can be examined by clicking on the theme to make it active and then clicking on the table icon. The polygon theme Attribute Table is currently in the following format:

    RECORD      AREA                PERIMETER               STR2#            STR2-ID    INSIDE
                  1      -1054562.375        21257.314                    1                        0                  0
                  2           76700.156          1740.047                    2                        3                  0
                  3           76640.000          1737.138                    3                        4                  0

    The polygon number STR2# is the field which balance reads in order to identify each polygon. The polygon numbers are not necessarily in order because of the way Arc/Info creates the polygons. In this case the first two polygons are in order from the upstream end and then the polygon numbers become jumbled as they go down the stream. This is annoying from the standpoint of figuring out which polygon is which in the table but it does not effect the BALANCE operation. In the arc attribute table the correct left and right polygons are identified in the table.

    BALANCE is set up to identify the polygon number field for a coverage as something other than STR2#. Because of this an error occurs if the program is run with STR2# as the polygon number field title. For a shapefile the polygon number field title which BALANCE recognizes is STR2_. To fix this misunderstanding by BALANCE the polygon coverage can be converted to a shapefile and the field title STR2# changed to STR2_.

    The attributes of the themes can be changed by depressing the M icon in the lower left corner of the toolbar. When a theme feature is selected, BALANCE prompts the user that the required fields for balance calculation are missing and asks if they should be added. All the required fields such as volume and pollution loads for the polygon theme and flow for the line theme are added.

    Unfortunately I ran out of time for working on this project and I was unable to determine correct and working stream values which would yield a meaningful mass balance run. I was able to come up with numbers to run BALANCE and produce a result which coincidentally coincides with the previously stated Total Phosphorus concentration from the TNRCC water quality test sites. The result of this BALANCE run are displayed in Figure 8.

    Figure 8. BALANCE run on the Lower Aransas River.

    As a curiosity and to get a feel for how BALANCE runs through a mass balance calculation, here is an animated GIF showing a run of BALANCE using the simple river model from Ferdi Hellweger's documentation.

    Fig. 9: Animated simple River BALANCE model.

  • Future Applications
  • For this study I chose a river section which is fairly isolated and without point sources to be analyzed. This study site was chosen for simplicity in developing the model. A more meaningful and potentially useful application of this method and model would be in an area which is far more dense in verification points and sources of pollution. The city of Beeville further north on the Aransas River would be a good site for such an analysis because of the numerous water quality testing sites and point sources.

  • Conclusions
  • The use of GIS with a program such as BALANCE has great potential for analyzing the complexity of a natural dynamic system such as a river to determine and forecast water quality parameters. Unfortunately, at this time I do not have the knowledge or understanding required to make a meaningful analysis of the many factors involved. I was able to make the first step towards easier analysis and understanding by creating a working river model for mass balance calculation.

  • References
  • Environmental Systems Research Institute, Inc. 1995. Understanding GIS the ARC/INFO         Method. Version 7 for Unix and OpenVMS. John Wiley & Sons, Inc. New York, NY.

    Hellweger, Ferdinand. 1997. Balance -Map Based Surface Water Quality Model. The University           of Texas at Austin.

    Quenzer, Ann. 1996. Completing a Base Map for a Geographic Information System (GIS)                    Assessment of Nonpoint Source Pollution for the Corpus Christi Bay National Estuary Program         (CCBNEP). The University of Texas at Austin.

    Saunders, William. 1996. A GIS Assessment of Nonpoint Source Pollution in the San
           Antonio-Nueces Coastal Basin. Thesis. The University of Texas at Austin.

    Thomann, Robert V. 1987. Principles of Surface Water Quality Modeling and Control. Haper       Collins Publishers Inc., New York, NY.

  • Internet Sites
  • Hydrologic Unit Codes - http://nsdi.usgs.gov/nsdi/products/huc.html
    Digital Line Graphs (DLG), Digital Elevation Models (DEM), and Land use land cover files (LULC)- http://edcwww.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html

  • Data Dictionary
  • Data Feature Class Attribute Description
    Arpoly.shp Shapefile of Aransas River Polygons Polygon
    Initial Concentration
    Nonpoint Runoff Load
    Atmos. Waste Load
    Other Load
    Sediment Load
    Decay Rate
    Decay Load
    Net Advective load
    Net Diffusive Load
    Str2 Aransas River Arc coverage created in ArcEdit then built in Arc/Info Arc Q
    Bulk Dispersion Coef.
    Boundary conc.
    Advective Mass Tran.
    Diffusive Mass Trans.
    arstr 1000-scale Digital Line Coverage containtining the Lower Aransas River Line Segment Arc - -
    hucaran USGS 1:250,000-scale Hydrologic Unit Code of the Aransas River Basin Polygon - -

    Back to my home page

    Return to the Course Home Page