CE 394K GIS in Water Resources

Spring 1998

 

 This page will be under continuous updates. Please email me for the related stuff which is not here (I may be able to help you) or come back for the updated version. Last updated on May 13, 1998.

 

Term Project

Use of digital databases for water rights investigations in Texas

 

 


 

The objectives

The project was started with three 'initial' objectives. They were

 

 

But during the course of the term project presentations it became obvious that the second objective was overlapping with the work of other Luis Aburto, so the objectives were slightly modified to save time & energy. A new dimension to these objectives was added by Kevin Wei's work. The refined objectives, which evolved as a result of the work done by other students, are

 

 Ç

 Methodology

The steps needed to complete the project were

 Ç

Selection of Basins

Three basins of Texas were selected to minimize the amount of work needed. They are

  1. San Jacinto Basin
  2. Guadalupe Basin
  3. Neches Basin

Click on the map to see a larger view of the map.

 

Neches is the largest of them all, whereas San Jacinto is the smallest in terms of area of each basin.

A graphical map showing the basins is shown above.

 The characteristics of the basins and their sizes are explained later.

 Ç

Data Acquisition

HUC Basin Boundaries Shapefile

The basin boundaries were selected using the data available on the CD titled 'US Spatial Hydrology Database: prepared by CRWR, UT Austin'. For the availability of this CD contact Dr. David Maidment. Data available on this CD is in Albers Projection for US. They can also be downloaded over the Internet from USGS site.

Digital Elevation Models (DEMs)

DEMs for delineating watersheds were downloaded from USGS Eros ftp server. Thirty-four 3" DEM tiles, each 1o x 1o in size (1201 columns by 1201 rows of cells) were obtained for three different basins of Texas. Originally I downloaded 34 1o x 1o tiles for three basins. Identification of relevant tiles was by overlaying the basin boundaries over county boundaries and than by overlaying those country boundaries by cell boundaries. A graphical image of Neches Basin, the counties, which fall within the boundaries of the basin and the 1o x 1o cells that are needed, are shown below. As can be seen, each cell is 2o wide and 1o high. Thus Austin has two 1o x 1o cells, one as Austin East and the other one as Austin West.

 (Click on the image to see a larger version)

Table showing the DEM sheets needed for each basin.

Stream Coverage RF1

After completing the process of building DEMs for the three basins, the next step was to get stream coverage and burn it on the DEMs.

RF1 coverage for the three basins was clipped using query builder tool from the RF1 coverage of whole of US available on the CD 'US Spatial Hydrology Database: prepared by CRWR, UT Austin'.

Rainfall Data

Rainfall data for the US is available from the Oregon State University PRIZM Project site. It was downloaded and saved as an ASCII file with an extension (.asc) and then imported into ArcView using File/Import Data Source (select ASCII Raster) and select the file US_ppt.asc. It will import the data directly into the current view. A view must be open and highlighted (top tab of the view should be deep blue in color) for this to work properly. Again rainfall data can be clipped to match the size of the DEM area using Analysis/Properties and Setting Map Extent equal to the 'Same as the DEM' of the basin. The Cell Size should be set to 'Same as the DEM'. This will help in multiplying the rainfall grid values with the DEM grid values to get the runoff grid.

Water Rights

Water Rights Locations for Texas were obtained from Mr. James Edmonds at TNRCC through Dr. Maidment. It was in Geographic Coordinates and was converted to the Albers Projection in a one step conversion process. Datum was also shifted from NAD 27 to NAD 83 in this one step conversion process. Click here to see the alb.prj file. Copy of the Water Rights for Texas can be had from me.

Ç

 Data Processing

Conversion of raw data to DEMs

For the purposes of keeping the matters getting too complicated, a separate directory for each basin should be created. Each DEM file is in two forms, compressed and uncompressed. It's better to download uncompressed files, they have a file extension of '.gz', and then uncompress them using the 'gunzip' or 'gnuzip' file compression utilities. Although the files can be downloaded using the ftp command, I used the Windows95 version of this transfer protocol, called wsftp_95. The only difference between the two is that one has a graphical interface while the other is command line based system, and obviously ftp requires UNIX system to run whereas is for the Windows based PC system.

 $ gunzip -d filename.gz

This will expand the file size and the file extension .gz will be removed.

After uncompressing the files, the first step was to limit the size of the data blocks using UNIX command

 $ dd if=inputfilename of=outputfilename ibs=4096 cbs=1024 conv=unblock

I had to use this command for all 34 DEM cell-blocks. Until individual DEM sheets were merged together, the commands had to be done on all the files individually. This was an extremely time consuming process.

After delimiting the text the next step was to get DEMs from the files. The command used was (in ArcInfo environment).

  Arc: DEMLATTICE outputfilename dem1 usgs

The input file for this process is the output file obtained after the delimiting process.

At the end of this command a new folder was created, with the name dem1. It had all the files necessary for a grid file. Typcial files in a grid folder are dblbnd.adf, hdr.adf, prj.adf, sta.adf, w001001.adf, vat.adf, w001001x.adf. In addition to this another folder name info was created which contained data files. At the end of this conversion process a brief message tells about the DEM parameters. The text of the message for a conversion process is shown below.

Loading header information...

Datum and Spheroid are missing.

Deducing from DEM projection...

Datum - WGS72, Spheroid - WGS72.

DEM extent [-345600.000, 108000.000, -342000.000, 111600.000]...

DEM surface range [13.000, 144.000]...

Sample distance in x and y [3.000, 3.000]...

Reading in lattice...100%

Rotating lattice...

Percentage : 100%

Output lattice is 1201 points in x, and 1201 points in y.

Individual DEMs were obtained for each block of 1o x 1o cells and then they were merged together using the GRID function commands (Grid function commands are sub-command functions of ArcInfo. To start Grid, first start the ArcInfo by typing arc and then type grid at the arc prompt).

Grid: newdem = MERGE ( dem1, dem2, dem3.... )

The newdem file is created after merging individual dem1, dem2 and other files obtained from the Lattice-DEM conversion.

  1. Nine individual DEM sheets were merged for San Jacinto basin
  2. Twelve individual DEM sheets were merged for the Guadalupe basin
  3. Sixteen individual DEM sheets were merged for the Neches basin. Names are given in the table.

Ç

Size Reduction of DEM Grids

The size of various DEMs obtained after doing all these processes was extremely large and it was impossible to manage them with the limited amount of space available on the system. Also, any operation that had to be done on those DEMs would have taken a lot of time. This was overcome by using changing all the grid values to integers from precision number format. This action alone reduced the size of the files by a factor of 10 approximately.

Grid: intdem = INT ( newdem )

Here intdem is the filename of the new integer DEM grid created by using the newdem grid from the merging of individual blocks.

Changing the Datum and Projection

The original data and DEMs obtained from USGS are all in geographic coordinates with 'decimal seconds' as units. As I was using the Albers Projection for US. So the data had to be converted to that projection. The coordinates of Albers Projection for US are:

29 30 0.000

45 30 0.000

-96 0 0.000

23 0 0.000

0.00000

0.00000

Although conversion of projection is not a complex process, but because this original data was WGS 72 datum based hence the conversion process had to be done in two steps.

Arc: project COVER intdem wgs84dem ds_datum.prj

Arc: project COVER wgs84dem albdem albers.prj

The key thing here is that, in the first step the intdem file was converted for the datum only. WGS 72 was shifted to WGS 84. Datum conversion between same types of datum is possible. The output of this datum conversion was wgs84dem. Albers projection is based on NAD 83 datum, which is equivalent to WGS 84 datum.

The output of first conversion (datum conversion only) was used as the input for next step, where the projection itself was converted. For more information one datum, projections and conversion see Exercise 3 on Map Projections.

The projection files, ds_datum.prj and albers.prj are shown in Appendix 1.

Ç

Resizing the Grid Cell Size

The original cell size of the grid was not exactly 100 meters. It is easier to work with 100-meter cell-size grids. In order to do this again GRID commands were used.

Arc: Grid

Grid: setwindow albdem

Grid: setcell 100

Grid: dem100 = albdem

The new grid dem100 obtained from this process will have a cell size of 100 meters. The albdem is the one, which was obtained from the previous step of projection conversion.

 

Getting rid of Excess areas beyond the basin boundary

The grid obtained after merging the cells was much bigger in area than needed for delineating the watersheds. In order to reduce the area of the grids itself, and only include area needed, the procedure used was simple.

  1. Add the DEM theme and the HUC boundary theme of the basin to the view.
  2. Make the HUC boundary theme active.
  3. Press the (zoom to active theme[s]) button.
  4. The view will be zoomed to the active theme(s).
  5. Now make the albdem theme active by clicking on the theme name once.
  6. Go to Analysis/Properties.
  7. Select 'Same as display' for Analysis Extent and 'Same as dem' for the Cell Size. Click OK.
  8. Go to Analysis/Map Calculator. Under Layers select albdem and press Evaluate.
  9. As a result of calculations a new theme titled 'Map Calculation 1' will be generated.
  10. Go to Theme/Convert to Grid to save 'Map Calculation 1' as a permanent theme.

Finally the DEMs for delineating watersheds and streams were ready for the three basins.

This is how a DEM for Neches basin looks like.

(Click on the image to see a bigger version)

 Ç

Clipping the RF1 Stream Coverage for the Basin

To do so, add the RF1 theme to the view from the CD. This theme was for the whole of US. To select the coverage for the selected basin only, use the query builder tool. The strings entered for Neches, San Jacinto and Guadalupe basins respectively were:

([HUC6] = 120200 )

([HUC6] = 120401)

([HUC6] = 121002)

All the streams in RF1 coverage for Neches basin were selected. As this selection process is temporary, they were saved by selecting Theme/Convert to Shape File.

This is how the RF1 clipped for the Neches basin looks like.

Ç

Extracting the Water Rights Locations for each Basin

Water Rights in Texas were supplied in the form of a shape file. The data was in decimal degrees units and geographic coordinates. This required quite some manipulation to extract the data. The data was in the zip format and after unzipping the files, the following steps were performed to develop point shape files within each basin. They can be obtained from me in Albers Coordinates as it will save a lot of time.

    1. Arc: generate wrloc
    2. Generate: input wr.dat
    3. Generate: points
    4. Generate: quit
    5. Arc: build wrloc points
    6. Arc: addxy wrloc
    7. Arc: list wrloc.pat ( this will list the generated wrloc file )

Arc: project COVER wrloc wrloc_alb alb.prj

This process was needed because, the original water rights coverage was a shape file with quite a few water rights having no values for latitude, longitude or water right ID. To overcome this, the Data was exported to MS Excel and than after processing it by adding values to the cells using a logical function (If B1<>0, B1, 0). This was necessitated because ArcInfo generate function for point coverage generation doesn't accept a space in the data file for a zero.

The water rights shape (point) coverage for individual basins look like this for Neches.

For San Jacinto Basin, their were 252 Water Rights. This is the Water Rights shape file for the San Jacinto Basin.

Guadalupe Basin had 540 Water Rights. This is how the Water Rights shape file for Gaudalupe Basin looked like.

 Ç

Defining Bay Areas

In order to define the bay areas separate from the land areas, two techniques were tried. I'll explain them separately.

For the Neches basin, it was possible to change the map extent and calculate a new grid, which had RF1 coverage protruding outside of the DEM. It is shown below.

The map shows two, DEMs, one with the RF1 coverage enclosed within the boundaries of the DEM and the other has the RF1 coverage sticking out of the DEM coverage. This way, when the DEM fill process was done to fill the sinks, the burned-in stream network didn't get filled back up.

 

In the second method, I used a map calculator to calculate a true false grid from the Basin DEM. The logical expression entered in the Analysis/Map Calculator was

[ned_dem > 0]

These produced a true false grid, with all the cells having elevation less than 1, as zero (false) and rest 1 (true).

Using this 'Map Calculation 1' grid, I divided the original Basin DEM grid of nec_dem by the Map Calculation 1. All the cells divided by zero (false) value ended up having a 'no data' value, as 0/0 is undefined value.

Ç

Burning-in of RF1 stream coverage on DEM

The theory behind this method is to raise the Basin Grid to be elevated by an arbitrary number and than add the stream coverage which is at the previous elevation level of the Grid. This is done to ensure that the surface water runoff from the grid is forced into the streams, which has a huge elevation differential with the DEM.

The steps involved in this conversion process are listed below. A script written by was also used to complete the process.

  1. Added the RF1 stream coverage [sjrf1.shp] for San Jacinto Basin into the view. Converted the theme into a grid theme by using the command Theme/Convert to Grid. Selected the HUC6 value for cell values. (Any field with non-zero numbers could have been selected for this purpose). Selected Same as SJDEM100 option for the cell size. Named the theme gridstrm. Feature Attributes from the sjrf1.shp were not joined to the new theme.
  2. Divided the gridstrm by itself using Analysis/Map Calculator. The logical expression entered was [gridstrm]/[ridstrm]. The result was added to the view as Map Calculation 1. Saved this theme permanently by using the command Analysis/Concert to Grid and assigning name unitstrm. This theme had either one or nodata values. All those places, which had zero value, had nodata assigned after the division of grid by itself.
  3. Multiplied the SJDEM100 to unitstrm theme using Analysis/Map Calculator, by entering the logical function [unitstrm] * [SJDEM100]. This resulted in the creation of another Grid, with all the stream cells having a value equivalent to the DEM cell elevation value. Saved this DEM as DEMstrm.
  4. Added a value of 2000m to the SJDEM100 Grid, using Analysis/Map Calculator. ([SJDEM100 + 2000]).
  5. Saved the above theme as elevDEM. Here is how it looks like.
  6. Used the script from Exercise 6 of spring 97 to merge the two themes elevDEM and DEMstrm. This script uses two themes, aGRID and bGRID and they are merged in the order of aGRID onto bGRID. Thus the values of DEMstrm are added to the elevDEM and they are 2000 meter depressed into the surface, thus forcing the water flow direction grid into the RF1 coverage of streams.
  7. Next steps were to fill sinks, generate Flow Direction, Flow Accumulation Grids. For the purposes of Stream Definition I chose the value of 10,000 as it gave a drainage area of 100 square kms for the definition purposes of a stream. Links Grid, Outlets Grid were generated.

Delineation of Sub-watersheds

Watersheds were generated from the above Grids. 129 sub-watersheds were generated in the San Jacinto Basin. After Dissolving Dangling Polygons, 119 were left. Here is how the delineated sub-watershed basin looks like.

From these delineated sub-watersheds, flow length calculations were done. Last step was to vectorize, streams and watersheds. Vectorized watershed polygons look like this.

 

 

RF1 Coverage and Water Rights

RF1 coverage was not very accurate. Water rights did not align very well with the RF1 coverage. For achieving a closer alignment between the two, my next step is to use DLGs of 1:100,000 scale for the purposes of delineating sub watersheds.

Conclusions

 

 

Work In Progress

  1. I have already downloaded the DLGs for hydrographic data for 16 of 1:100,000 resolution blocks. The purpose is have a closer match between the Water Rights and the Streams on which they exist. RF1 coverage's spatial resolution of data was not good enough to provide a good stream coverage. The list of files which I had to download, process (unzip, delimit, arc to dlg conversion) is given below. For each of the file, these three processes had to be performed. For the Digital Line Graphs, each 1degree block is divided into eight 15' x 15' blocks which are numbered from 1 to 8. The numbering system is such that block 01 will be on top left. Block 08 is on bottom right. This shown below.
  2. 01

    02

    03

    04

    05

    06

    07

    08

     

     

    List of files

    Sixty four files were downloaded and processed for San Jacinto Basin. Each file is a square box of 15 minutes by 15 minutes in size. They come in two different types of formats. One is called the optional format and the other is standard format. The scale of the themes is 1:100,000. A higher resolution map having a scale of 1:24,000 is also available.

    Name of the File

    Size

    Name of the File

    Size

    agdlg1

    176610

    ecdlg3

    199277

    agdlg2

    227788

    ecdlg4

    141986

    agdlg3

    159888

    ecdlg7

    137688

    agdlg4

    197953

    ecdlg8

    187463

    agdlg5

    187524

    eldlg3

    167195

    agdlg6

    195097

    eldlg4

    163671

    agdlg7

    326704

    eldlg7

    191456

    agdlg8

    393451

    eldlg8

    147252

    ahdlg1

    305993

    gvdlg1

    281741

    ahdlg2

    220027

    gvdlg2

    64927

    ahdlg5

    88299

    gvdlg5

    79093

    ahdlg6

    283173

    gvdlg6

    2841

    bhdlg3

    199927

    hodlg1

    281886

    bhdlg4

    203387

    hodlg2

    233548

    bhdlg7

    188683

    hodlg3

    146280

    bhdlg8

    216092

    hodlg4

    311365

    bndlg3

    252587

    hodlg5

    178754

    bndlg4

    353235

    hodlg6

    250965

    bndlg7

    350914

    hodlg7

    156230

    bndlg8

    392179

    hodlg8

    338766

    budlg1

    322662

    hvdlg1

    357291

    budlg2

    130794

    hvdlg2

    341593

    budlg5

    273218

    hvdlg3

    403634

    budlg6

    182069

    hvdlg4

    292081

    cndlg1

    230440

    hvdlg5

    307061

    cndlg2

    294833

    hvdlg6

    298516

    cndlg3

    205827

    hvdlg7

    267578

    cndlg4

    177354

    hvdlg8

    249496

    cndlg5

    181562

    lsdlg1

    226869

    cndlg6

    240833

    lsdlg2

    210187

    cndlg7

    223696

    lsdlg5

    209457

    cndlg8

    236749

    lsdlg6

    160898

    Sub-script descriptions are as follows

    Bryan E

    'bn'

    Huntsville E/W

    'hv'

    Livingston W

    'lv'

    Brenham E

    'bh'

    Conroe E/W

    'cn'

    Beaumont W

    'bu'

    Eagle Lake E

    'el'

    Houston E/W

    'ho'

    Anahuac W

    'ah'

    El-campo E

    'ec'

    Angleton E/W

    'ag'

    Galveston W

    'gv'

     

  3. For each of these files, a number of steps were performed to get the data into an arc format.
  1. The final step would be to delineate the watersheds and vectorize them using DEMs burned-in with 1:100,000 DLGs.

 

 

My homepage