Exercise: Processing a Boundary

Center for Research in Water Resources
University of Texas at Austin

Prepared by Cindy How
December 1996

(edited May 1997)


Table of contents



Goals of the Exercise


Computer and Data Requirements

This procedure requires both ARC/INFO and Arcview (version 2.1 or higher). You will need the project file (.apr) which will be opened in Arcview.

Data that you will need includes:


Introduction

This exercise is meant to be a precursor to the exercise Atmospheric Water Balance of the 1993 Midwest Flood. The exercise concerns visualizing and calculating data concerning atmospheric moisture flow over the Midwest.

To run the exercise, one requirement is a line theme of the study area boundary. This theme must consist of straight lines of approximately equal length. Another requirement is the atmospheric moisture flux data associated with the center points of those lines. A description of the data used and the computations is found in the introduction to the exercise.

This exercise provides instruction on how to take the coverage of a general area and convert it to the format needed to complete the exercise on the Midwest flood.

The goal of this exercise is to provide instruction so that a study similar to that on the Midwest flood could done over any region. Possible other studies include the transport of constituents other than water over an area.

The example used to demonstrate the steps is an atmospheric water balance over the region of Texas. The names of the themes created throughout this example are in parenthesis in the steps which create or involve them.


Procedure

1. Downloading the necessary files
Create a directory called awatbal on your computer. If working from the GISHydro97 CD rom, copy the file awatbal.apr from /atmos/awatbal to your working directory. The file is also available via ftp. Download the file atwatbal.apr in binary format from ftp.crwr.utexas.edu. Log in as anonymous.:
Site: ftp.crwr.utexas.edu
Log in as: anonymous
Directory: /pub/gishydro97/atmos/awatbal

If you haven't used ftp before, you might need to look at Instructions on how to use anonymous ftp.

A coverage of the Texas boundary (as a shape file) is provided so you can work through this example. To use this coverage, you will need three files:

  1. txbnd.shp
  2. txbnd.shx
  3. txbnd.dbf


These files are available on the GISHydro97 CD rom in /atmos/awatbal, as well as on the FTP site. To download the files, ftp to ftp.crwr.utexas.edu and download the files from /pub/gishydro97/atmos/awatbal.

2. Getting a line coverage of the boundary from ARC/INFO

You should already have a coverage of the area of interest. It should be projected with units of meters. Which projection is appropriate will depend on where on the globe your area of interest is located. The projection which best conserves distance should be chosen. You need to note what this projection is as well as its parameters. To do this, in ARC/INFO describe your coverage. Listed under the heading of Coordinate System Description will be the projection, units, and parameters of your coverage. Make a note of these. They will be needed later.

For more information on projecting and map projections, Exercise 3: Map Projections, prepared for the course CE397, GIS in Water Resources.

For example, for a coverage called txbnd, type:

describe txbnd
The coverage of Texas used was in Albers projection.

This coverage can be opened in Arcview. If using Arcview for a PC, the coverage should be converted to a shape file. The shape file can then be ftped to a PC. To convert to a shape file, in ARC/INFO type:

arcshape line txbnd txbnd

This will take the coverage (txbnd) and create 3 files:


Ftp these files in binary mode.

3. Opening the project in Arcview

Open Arcview. Go to File and select Open Project. Go to the directory where you saved the project file from step 1. Select the project file awatbal.apr

Note that all files should be in the same directory. Created files will also be put into that directory.

Now that you've opened the project, you need to bring your boundary theme into the project. Select Views and open the view Atmospheric Water Balance. To bring your boundary into the project, hit . Go to the directory where your boundary is saved and select it (txbnd.shp). Your theme will be added to the view. To view the theme, click on the small gray box next to the theme name.

4. Converting the initial boundary line to selected points

Several steps must be taken to convert your initial boundary to the points needed to acquire the atmospheric water flux data. Each step runs a script by hitting a button. These buttons are found in the Tools portion when you have a view open. They are immediately to the right of the button.

To see the scripts, select Scripts from the Project window.

The end result of these steps are:

The steps are:

  1. Convert the original line boundary into the points which describe the boundary.
  2. Remove duplicate points.
  3. Set corner points. (optional)
  4. Create a line theme of the boundary of lines of equal length.
  5. Get the center points of the line theme.

    1. Convert the original line boundary into the points which describe the boundary.
      This is done by hitting the button which runs the script line2pnt.ave. You will be asked to chose a theme to break down. Select the theme of your original boundary (txbnd.shp).
    2. You will be asked to give a name for the point theme created in this step. This new theme will automatically be added to your view. In the example shown, the name chosen was Txpnt.shp.


      You will also be asked whether you wish to dismantle the theme in a clockwise or counter clockwise direction. Either option will work.

    3. Remove duplicate points.
      Since the theme just formed can consist of more than 10,000 points, some must be removed. If there are an excessive number of points, the next script will not run. To remove some of the points, hit the button. When asked which theme to remove points from, select the theme you created in the previous step (txpnt.shp).
    4. You will then be asked for a tolerance. This tolerance is a distance in meters. Any points closer together than the tolerance will be deleted. A default value of 500 meters is given and is generally acceptable. Use discretion, however, depending on the magnitude of the boundary being processed. The script associated with this button is rmvpnts.ave

      You will be asked to name the new theme created (txpntrmd.shp).

    5. Set corner points.
      This is an optional step which runs the script setcorner.ave. For example, no corner points were set for the Midwest Flood exercise. However, all other steps in the procedure are identical for both cases. Setting corners should be used if you wish to preserve the shape of the area when displaying results or if including the entire area in your analysis is imperative.
    6. To set corner points, display the theme you created in the previous step. Do this by clicking on the small box next to that theme in the view window. Then, hit the button . This runs setcorner.ave.

      When asked to select a theme to set corners on, select the theme created in the previous step (txpntrmd.shp).

      When prompted to confirm your selection, choose yes.

      When asked if you want to reset the existing corners, select yes. If you have previously run the script and are adding new corner points, select no.

      Move the cursor to a point on the theme that you wish to preserve. Click on that point.

      The red dots appear when a point is selected. All dots can be removed by going to Edit/Select all graphics, then hitting delete. However, even if the graphics are removed, these points are still designated corner points. They can be reset by running setcorner.ave again and opting to re-initialize the corners. Likewise, if you reset the corner points, the red dots still appear, though the associated points are no longer designated as corner points. Should you wish to reset the corner points, make sure to remove the red dots in the fashion described above.

      In this step, another theme is not created. The theme selected is modified. It is the same them which should be used in the following step.

    7. Create a line theme of the boundary of lines of equal length.
      Hit the button. Arcview runs the script pnt2line.ave and will ask you to select a point theme. Select the theme modified in the previous step (txpntrmd.shp). Name your output file when prompted (Txgenbnd.shp).
    8. Arcview will prompt you to enter a length. This length will be the length of the lines created (with the exception of those which would cross corner points). The default is 10,000 meters..

      The length you choose will depend on the size of your boundary. For Texas, a length of 100,000 meters was used, resulting in 73 line segments describing the boundary. If you end up with an irregular boundary, it is likely that the length you chose was too small. Delete the theme you created and run the script again, using a larger length.

      An example is shown of Texas with and without corner points set.

      The theme created in this step is input to the atmobal exercise.

    9. Get the center points of the line theme.
      You also need to get the center points of the lines in the theme just created. To do this, hit to run centerpt.ave. You will be asked to name 2 themes. One will contain the center points of the lines created (outpoint.shp). The other will create vectors normal to those lines at the center points (outvectr.shp).
    10. The theme with the vectors can be used to check that all lines are drawn in the same direction. The vectors should be pointing consistently outward.

    5. Projecting the points into Geographic Coordinates

    To obtain the moisture flux data, you need the points just created in geographic coordinates. This must be done in ARC/INFO. Copy the theme with the center points (outpoint.shp) to the account where you will use ARC/INFO. Remember, if ftping data from a PC, to transfer the data in the binary mode. Again, three files must be transferred.

    For example, for a theme called outpoint, the following files would be transferred:

    Open ARC/INFO. Use the command shapearc.

    shapearc outpoint outpoint

    This creates an Arc/Info coverage called outpoint from the shape file outpoint. To name the coverage something different from the name of the theme, the last word in the command would be replaced with the name of your choice.

    This coverage is in the same projection as your original boundary coverage and must be projected into geographic. This is also done in ARC/INFO. Recall the information on the projection and its parameters you noted in step 1.

    After starting ARC/INFO, use the command project.

    This would result in a coverage called latlong with the points from outpoint in geographic coordinates. Shown is an example of the steps used in projecting the points for Texas from an Albers projection to Geographic coordinates.

    Once you have projected your coverage to geographic coordinates, you need to ungenerate your coverage.

    This will generate a comma separated variable text file called latlong.gen. This file will have one line per point. The line will have 3 items.

    Example:

    This text file is what can be used to obtain atmospheric flux data, as obtained for the atmobal exercise. The first item for each point is an identification number. X_coord and y_coord are the longitude and latitude of the points. These are in decimal degrees. A copy of the latlong.gen file generated in processing the boundary of Texas is available on both the GISHydro97 CD and the FTP site.

    6. Getting x and y components of length

    This step can be done one of two ways.

    1. a. Using the projected theme.
    2. b. Using the coverage in geographic coordinates.

    a. Using the projected theme.

    b. Using the coverage in geographic coordinates.

    7. Obtaining the Atmospheric Flux Data
    For the example exercise on the Midwest flood, data was obtained from Allen Bradley at the University of Iowa. Details on how this data is developed is included in that exercise.

    You can mail Allen Bradley for atmospheric flux data. You will need to supply him with the file greated in Step 5, likely through ftp. Other possible sources of data are discussed in Alternative data sources.

    8. Analyzing the data in Arcview: Computing the Atmospheric Water Balance

    Steps after this point are described in Atmospheric Water Balance of the 1993 Midwest Flood. The scripts run in the Midwest flood exercise are included in the awatbal project file. One change should be noted. The in the atmobal exercise is in this exercise. The in atmobal is in this exercise.


    Alternative data sources

    Some other places atmospheric data may be obtained are:


    This data would have to be transformed into an appropriate format before being used as described in this exercise and in the atmobal exercise. For more information on the data, refer to the given websites.


    For questions about this exercise, e-mail me at:
    Cindy How
    c.how@mailcity.com


    These materials may be used for study, research, and education, but please credit the authors and the Center for Research in Water Resources, The University of Texas at Austin. All commercial rights reserved. Copyright 1997 Center for Research in Water Resources.