Michael Byrne

CALIFORNIA SALMONID HABITAT INVENTORY:

A DYNAMIC SEGMENTATION APPLICATION

ABSTRACT

Over the past few decades native California salmonid populations and habitat rapidly declined. In order to help restore the fishery, the California Department of Fish and Game established standard protocols for assessing fish populations and habitat. The ArcInfo Dynamic Segmentation process associates fish habitat data with existing stream data. Arc Macro Language scripts were developed to correct stream data and create route topology. Using ArcView software, remote field personnel can perform spatial analysis with the habitat data. From Oregon to Sonoma County, 290 salmonid spawning streams (766 miles of stream) have been surveyed and georeferenced using this protocol. Spatial habitat data in the hands of regional biologists improves the salmonid habitat restoration site evaluation and/or selection process.


INTRODUCTION

The California Department of Fish and Game (DFG), in association with other State, Federal and local agencies, has documented the decline of native salmonid (primarily steelhead, coho, chinook) populations over the past few decades. _An Environmental Tragedy_ (1971) identifies an 80 percent, 65 percent and 64 percent decline in North Coast California steelhead, coho and chinook runs, respectively. Since 1954, California's north coast has seen an 80 percent decline in steelhead and trout (CA Advisory Committee on Salmon and Steelhead Trout, 1988). The decline of these species is primarily due to the loss of key spawning and rearing habitat or the inability of fish to get to spawning habitat.

Realizing the important role salmon and steelhead play in California's economy and ecological health (Advisory Committee on Salmon and Steelhead Trout 1986), the State of California passed legislation that requires DFG to restore the states salmon and trout fisheries. The Sport Fishing Act (Dingell-Johnson Act) and the Bosco-Keene Assembly Bill 951 (1981), combined with permit fees, licenses and taxes on sporting goods, provides funding for DFG's Anadromous Fish Program. In 1991 biologists and habitat specialists in the Anadromous Fisheries Habitat restoration Program wrote the California Salmonid Stream Habitat Restoration Manual. The manual describes a standard methodology and data base structure for restoring fish habitat on salmonid streams in California.

The first step in the Salmonid Habitat Restoration Manual is to complete a Watershed Assessment. Researching historical records, maps and other data, biologists assess basic information on 1) past, present and potential habitat and fish production 2) water quality and quantity 3) future study assessment needs and 4) future restoration potential.

The second step in the Habitat Manual requires a stream habitat inventory achieved through instream field data collection. The habitat inventory is a hierarchical method of stream channel (Rosgen 1994) and habitat typing (variation of Bisson et al. 1982). Channel typing classifies morphological features of relatively long reaches (a mile or more) while habitat typing classifies instream pool, flatwater and riffle habitat units (10 to 60 feet long). Physical data fish shelter, spawning suitability, erosion potential and barriers are measured in each habitat unit. All surveys start at the stream confluence and stop at the end of anadromy. The result is the delineation of habitat units in terms of quantitative physical attributes. Compiled in habitat tables, inventories provide the basis for evaluation and monitoring (See Appendix for the list of data sampled).

The third step in the Habitat Manual is to perform a bioinventory of fish and other aquatic resources within a stream. The Habitat Manual illustrates standard fish sampling methods.

By summarizing data acquired in the first three steps biologists can determine if restoration is necessary. The last three steps of the Habitat Manual, Project Planning, Implementation, and Monitoring/Evaluation, explains the necessary requirements for establishing restoration sites. Funding, necessary materials, construction, project evaluation, and monitoring procedures are all discussed in these chapters.

Using a relational data base, Dynamic Segmentation measures habitat data along existing georeferenced linear data as events. This paper will discuss the ArcInfo techniques used to implement Dynamic Segmentation. I will present the amount of data collected so far, and then examine the implications of this GIS data.

METHODS

The Dynamic Segmentation process is accomplished by 1) Preparing a hydrography arc coverage with a unique numeric value for each named stream 2) Ensuring flow direction for each stream 3) Building route/section topology for each stream 4) Preparing the habitat table as linear event data with a)measure distances based on field inputs and b)a unique key value for each named stream 5) Calibrating routes based on field input from habitat table 6) Displaying habitat tables in ArcView, converting to ArcView shapes and distributing to field personnel.

1. DFG has obtained US Geologic Survey (USGS) Digital Line Graph (DLG) 100,000 scale hydrography (See Appendix for Hydro Meta Data and structure). In 1993, the US Environmental Protection Agency (EPA) attached the River Reach File Version 3 (RF3) addressing system to California's hydrographic coverage Arc Attribute Table (.AAT). Arcs along the same named watercourse share a common primary name code, or PNMCD. The unique key value for each stream is the EPA national standard PNMCD.

2. Prior to building hydrography route/section topology, streams must have consistent linear direction. I developed an Arc Macro Language (AML) method for establishing direction of all streams based on topology with no operator (See Appendix for flow.aml and lake.aml). This process pathwalks each named stream from its headwaters to its mouth and ensures all arcs point downstream (including double lined streams). The DLG MINOR5 field is populated with the arc numeric sequence of each stream from the mouth.

Figure 1

3. I developed an ArcEdit AML which creates Route/Section topology (See Appendix for mkroute.aml). The blanket Arc level MAKEROUTE command will not ensure direction of all routes. The AML creates one route for each unique PNMCD, in which the beginning measure of the route is at the streams confluence (arc MINOR5 = 1 from flow.aml) and the ending measure is at the streams headwater. The resulting Route Attribute Table (.RAT) has one record per unique PNMCD. The resulting Section Attribute Table (.SEC) has one record for arcs along each PNMCD.

Figure 2

4. Preparation of habitat data as event tables contains the following processes: A) Insure the table has a properly populated route relate item and B) create and populate measure items.

In some cases field personnel will not have the PNMCD value for the surveyed stream, and will enter instead a latitude and longitude of the stream confluence, the township range and section number (called legal) and/or the stream name from the USGS 7.5 Minute Quadrangle. By cross referencing the quadrangle, lat/lon coordinates, legal description or the stream name with the RF3 file, I find and enter the proper PNMCD value in the habitat table. Each habitat table data will relate to the .RAT on the PNMCD.

The habitat table contains one record per habitat unit. The LENGTH field is the length of each habitat unit, measured in feet. Measure fields FROM, TO (for linear events), and LOCATION (for point events) are added to the habitat table. The FROM field is equal to the previous FROM value (0 for the first record). The TO field is equal to the FROM field plus the LENGTH field. The LOCATION field only populated when point event locations occur. While occurring anywhere in a habitat unit, point events are surveyed with the same length as a habitat unit. The LOCATION field equals half of the FROM FROM field plus the TO field. Measure items are converted to meters, the units of the hydrography coverage projection. Each record of a habitat table will relate to the .SEC on the measure items FROM, TO or LOCATION.

Figure 3

5. A point coverage for each survey, is made from each tributary's confluence or road crossings and the end of the survey. The end of survey point is digitized from a photocopied USGS quadrangle. The points are attributed with the length to the mouth taken from the habitat table, in meters. The Arc command CALIBRATEROUTES uses the point coverage to correct the arc measured distances with the field observed distances.

Figure 4

6. In Arcview, a view is added to a project and the hydrography route topology added to the view. The habitat event table is added to the project. With the view the active document, ADD EVENT THEME from the VIEW menu is chosen. The Add Event Theme dialogue box is populated, and the survey is displayed as an event theme. The THEME CONVERT TO SHAPE menu choice converts the event theme to a shape file. The shape file can be displayed and classified on any or multiple fields in the Habitat Inventory. The process is repeated for point events.

RESULTS

The Habitat Inventory Process has four output dBASE files (Watershed Overview, Habitat Type, Biological Survey, Carcass Survey). Due to in-house priorities and limited time, Dynamic Segmentation has only been implemented on the Habitat Type (channel and habitat typing methods) data set. Furthermore, only sidechannel point events from habitat data have been established.

Only a selection of habitat data has been calibrated.

There are 290 streams (766 total miles) surveyed and georeferenced.

Figure 5

I expect to dynamically segment all data from the Habitat Manual by the end of 1996. Biologists note other important point events, like culverts, bank erosions, and other biota. By next year, I hope to implement all other point event data, as well as habitat data.

DISCUSSION

Two elements to this process are very significant. First it is extremely important to ensure flow direction of hydrography arcs. There are over 250,000 arc segments in the California DLG. Developing a tool to pathwalk these arcs and correct direction without operator input is invaluable. Second converting dynamically segmented habitat data into ArcView shape files, widens data availability and accessibility. Biologists only need to know two buttons in ArcView, and not 15 line commands in Arc/Plot, in order to query, display and analyze habitat data.

The availability of the data allows biologists to make better decisions. With limited restoration money, resource managers need to funnel resources into the sites that have the most potential for success. Prior to Dynamic Segmentation, biologists could only summarize the length of habitat to find out how much of a particular habitat characteristic occurred on a stream. With Dynamic Segmentation, biologists can see where these characteristics occur along the stream. Displaying habitat data spatially increases the biologists' ability to identify potential restoration sites. Some of the questions biologists can answer are: Where does high siltation occur? Do these areas also have low shading or high temperatures? Where are the deep pools with large cobble substrates? By displaying the areas of low quality habitat (low canopy or high siltation) along with the areas of fish presence and suitable stream gradients, restoration sites with the most benefit and success potential can be identified.

Figure 6

Likewise, resurveying a stream in successive years will provide insight into the changing habitat. Causes of decreasing habitat quality can be identified with network analysis of habitat data dynamically segmented over the same reaches of stream.

Habitat modelling is also possible with dynamic segmentation. By identifying the progression of channel types fish must migrate through, biologists can gain understanding about the physical stress individuals exert in certain streams. High fish population numbers regressed against key habitat characteristics could provide habitat suitability indexes. Such indexes will improve management decisions.

The power of this system lies in the standard data collection methods. Local biologists can set local restoration priorities based on their own data. At the same time, statewide coordinators can use data collected by different biologists in different regions, using the same protocols, to look at overall trends of fish habitat and populations.

ACKNOWLEDGEMENTS

None of the techniques used herein could have been established had it not been for the dedicated work of Sr. Fisheries Biologist Tim Curtis. Tim, Gari Flosi, Michael Bird, Scott Downie and James Hoplain wrote the Salmonid Habitat Restoration Manual and had the foresight to include standard data structures relating to spatial data. I would also like to thank Bob Coey, Gari, Scott and all other field biologist who spent endless hours in the field collecting data. Lastly I would like to thank those involved with DLG Hydrography work in California, namely Paul Veisze and Karen Beardsley.

APPENDIX

APPENDIX A



HABITAT DATA STRUCTURE

----------------------



The following is the structuce and definition of the items contained in

the habitat data bases.  On each line is the Column the field begins in,

the field name, the number of characters/integers the field takes up,

whethere it is character or integer, and a brief description of the field.

For more information please refer to the Salmonid Habitat Restoration

Mannual (the green book).



COLUMN   ITEM NAME        WIDTH TYPE N.DEC  DESCRIPTION

------------------------------------------------------------------

    1  STREAM                25  C      -   What you call the stream name.

   26  LEGAL                 11  C      -   Town., Range, Section (see below).

   37  LATD                   2  I      -   Confluence Latitude Degrees.

   39  LATM                   2  I      -   Confluence Latitude Minutes. 

   41  LATS                   4  N      1   Confluence Latitude Seconds.

   45  LOND                   3  I      -   Confluence Longitude Degrees. 

   48  LONM                   2  I      -   Confluence Longitude Minutes.

   50  LONS                   4  N      1   Confluence Longitude Seconds. 

   54  QUAD                  10  C      -   USGS 24000 Quad Name@ confluence.

   64  RF3RCHID              17  C      -   Full EPA RF3-ID @ Confluence. 

   81  PNAME                 30  C      -   EPA PNAME. 

  111  PNMCD                 11  C      -   EPA PNMCD. 

  122  SURVEYORS             25  C      -   Who surveyed.                     

  147  DLAT                   8  N      4   Decimal Degrees Lat at survey start.

  155  DLONG                  8  N      4   Decimal Degrees Lon at survey start.

  163  FLOW                   6  C      -   Recorded flow in cubic feet/second.

  169  DATE                   8  D      -   Date Surveyed.                 

  177  CHANNLTYPE             4  C      -   Channel Type of Habitat Unit. 

  181  REACH                  2  C      -   Sequential Reach Number. 

  183  TIME                   5  C      -   Time @ habunit. 

  188  WATER                  3  C      -   Water Temperature in Fahrenheit. 

  191  AIR                    3  C      -   Air Temperature in Fahrenheit. 

  194  HABUNITNUM            16  C      -   Sequential Habitat Unit Number. 

  210  HABTYPE                9  C      -   Habitat Type 

  219  SIDECHANNL             3  C      -   Habitat Unit Type of Side Channel.  

  222  LENGTH                 8  N      1   Length in feet of Habitat Unit. 

  230  STRM_LGNTH             7  I      -   Total length from confluence. 

  237  MEAN_WIDTH             6  N      2   Mean width of habitat unit. 

  243  MEAN_DEPTH             5  N      2   Mean depth of habitat unit. 

  248  MAX_DEPTH              5  N      2   Maximum depth of habitat unit. 

  253  AREA                  10  N      2   Calculated, length X mean_width

  263  DPTPLCREST             4  N      2   Depth pool tail crest, in feet.  

  267  RESPOLDPTH             5  N      2   CALCULATED residual pool depth

  272  VOLUME                10  N      1   CALCULATED volume

  282  RESPOOLVOL            10  N      1   CALCULATED residual pool volume

  292  EMBEDDED               1  I      -   Pool tail embeddedness.          

  293  SHEL_VALUE             1  I      -   Shelter Value. 

  294  PCT_COVER              3  I      -   Percent Unit Covered.

  297  SHELT_RATN             4  I      -   Shelter Rating 

  301  UNDER_BANK             3  I      -   Under Bank Rating 

  304  PER_SWD                3  I      -   Percent small woodt debris 

  307  PER_LWD                3  I      -   Percent Large woody debris

  310  PER_ROOT               3  I      -   Percent root wad 

  313  TERR_VEG               3  I      -   Terrestrial vegetation 

  316  AQUA_VEG               3  I      -   Aguatic Vegetation 

  319  WHITEWATER             3  I      -   Whitewater 

  322  PER_BOLDER             3  I      -   Substrate 

  325  BEDROCKLED             3  I      -   Substrate 

  328  SILT_CLAY              1  I      -   Substrate 

  329  SAND                   1  I      -   Substrate 

  330  GRAVEL                 1  I      -   Substrate

  331  SMCOBBLE               1  I      -   Substrate 

  332  LGCOBBLE               1  I      -   Substrate 

  333  BOLDER                 1  I      -   Substrate 

  334  BEDROCK                1  I      -   Substrate 

  335  PCT_EXPOSE             3  I      -   Percent exposed substrate. 

  338  PCT_CANOPY             3  I      -   Percent total Canopy. 

  341  PCT_DECID              3  I      -   Percent Deciduous Trees. 

  344  PCT_CONIF              3  I      -   Percent Coniferous Trees. 

  347  RTBKCOMP               1  I      -   Right Bank Composition. 

  348  RTBKDOMINT             1  I      -   Right Bank Dominant Vegetation. 

  349  PCT_RTBKCO             3  I      -   Percent Right Bank Vegetation. 

  352  LFBKCOMP               1  I      -   Left Bank Composition. 

  353  LFBKDOMINT             1  I      -   Left Bank Dominant Vegetation. 

  354  PCT_LFBKCO             3  I      -   Percent Left Bank Vegetation. 

  357  CODE                   1  C      -   temporary field 

  358  FROM                   8  N      2   Dyn/Seg measure item

  366  TO                     8  N      2   Dyn/Seg measure item 

  374  LOCATION               8  N      2   Dyn/Seg measure item            

------------------------------------------------------------------------

APPENDIX B



CALIFORNIA DEPARTMENT OF FISH AND GAME GIS METADATA



METADATA FILE: hydro3.txt

METADATA DATE: January 2, 1996

METDATA PATH: dfghost:/tsb/dfgbase/hydro



METADATA SOURCE 1: 

Date: Wed, 22 Nov 1995 11:42:49 -0800

From: Paul Veisze 

Subject: teale hydro meta

X-Url: http://www.gislab.teale.ca.gov/meta/hydrogra.txt



METADATA SOURCE 2: dfghost:/tsb/dfgbase/hydro/hydro2.txt



Modified 1-2-96:



Primary Name and Primary Name Code (PNAME,PNMCD) for Pacific Ocean

corrected/completed statewide.  Issue remains as to how to deal with

bays and wide rivers opening to the Pacific Ocean with/without 

artificial "closure" arcs.



All PNMCD character string entries in .DS2 tables were left-justified.



Modified 11-22-95:



Item HYSNUM recalculated: HYSNUM = HYSNUM + 10

This was done to ensure a unique primary key when HYSNUM is combined

with item HSCKEY (described below).  Duplication of certain values

occurred in original version, e.g. HYSNUM = 1, HSCKEY = 12--would be

a duplicate of HYSNUM = 11, HSCKEY = 2.  The original range of 

HYSNUM values was 1 to 33; in the DFG hydrography version it is now

11 to 43.  



See also major updates by DFG to hydrographic names and

US EPA River Reach File (RF3) codes (NOTE: RF3 item UPDTSRC1 does not

yet reflect the DFG version of HYSNUM, use Teale version until

further notice).



DFG version has deleted non-hydrographic "neatlines" (outline of

250K quad boundaries)--where such boundaries did not form part of

open water shorelines.



----begin Teale hydrography metadata as modified ----

LIBRARY       : 

LAYER NAME    : 

COVERAGE NAME : JHYSA

LOCATION      : /tlib/hydro



COVERAGE DESCRIPTION:

  

The hydrography layer originally came from the USGS in digital line

graph (DLG-3) data format. DLG-3 data were captured from

1:100,000-scale maps by manual digitizing and raster scanning.

There are approximately 3200 DLG files represented in the

statewide hydrography data layer.



The hydrography layer consists of all flowing waters, standing

waters, and wetlands---both natural and manmade.  The coverages 

contain two separate feature types: polygons (areas) and lines.

Polygon features have attribute codes that identify water bodies

such as lakes, wide river segments, or swamps.  Line features 

have attribute codes that represent streams or shorelines.



Edits to the original linework have been made during the data

conversion by Teale from the original DLG-3 format to the

ArcInfo(tm) GIS format.  Such changes include line movements

(due to the map edge-matching process), minor corrections of

attribute coding, and the closing of open polygons.  Flow direction

for streams (type line) has also been added.  Stream lines are flagged

(where item FLOW = 1) to indicate whether or not the direction of

a given stream (line) has been defined and/or verified by Teale.

  

County lines (a separate Teale data layer) and hydrography lines

are not reconciled with each other and discrepancies between the

two will occur when a county boundary follows a water feature.



Hydrography of the entire state is stored in 33 separate ArcInfo

coverages or tiles, whose individual boundaries correspond to

the USGS 1:250,000-scale quad series (see index coverage called 

hydroindexa and index diagram below).  Coverage names consist of 

two unique characters plus a suffix -JHYSA.  Most of the two-

letter codes abbreviate a quad name, for example: RDJHYSA, for 

the Redding quad.  The tiles are also numbered from 11 to 43, 

northwest to southeast, and this numeric code is contained in 

the item HYSNUM.  A separate item, HSCKEY, contains a number 

unique to each arc within a tile.  Both the HYSNUM and HSCKEY 

items are contained in the coverage's Arc Attribute Table (AAT).  



In 1992, the Teale hydrography data layer was sent to US EPA for

use in their River Reach File system version 3, also known as

Reach File 3 or RF3-alpha.  RF3 is US EPA's national hydrographic

addressing system which contains unique location and connectivity

codes, water feature names, and update documentation.  This system 

was developed by Horizon Systems Corporation, under contract to 

the US EPA Office of Water.  RF3 as archived at Teale consists of 

US EPA-generated data tables, designated by the filename extension

.DS2 (for example: RDJHYSA.DS2).  The DS2 file is stored as an 

'external' data table within the hydro workspace's INFO subdirectory.



There are two ways to link the RF3 records in the DS2 files with 

the hydrography arc attribute tables (AAT).  The first involves the 

item RF3RCHID, which is a concatenated string consisting of three 

fields: the USGS Cataloging Unit (CU, an 8-digit watershed code), 

a numeric stream segment identifier (SEG), and a Marker Index (MILE),

an item indicating relative upstream position along a given SEG.  

The second way to link the DS2 and the AAT is on the HSCKEY item 

described above.  The RF3RCHID and HSCKEY items are present in 

the Teale versions of both the DS2 and AAT files.  Note: the most 

reliable primary key for individual hydrography features consists 

of HYSNUM combined with HSCKEY.



VITAL STATISTICS:

  

  Datum:                       NAD 27

  Projection:                  Albers

  Units:                       Meters

  1st Std. Parallel:           34 00 00

  2nd Std. Parallel:           40 30 00

  Longitude of Origin:         -120 00 00

  Latitude of Origin:          00 00 00

  False Easting (X shift):     0

  False Northing (Y shift):   -4,000,000

  Source:                      USGS DLG-3 (optional format) 

  Source Media:                Magnetic tape (80 byte records) 

  Source Projection:           Universal Transverse Mercator 

                               UTM  Zones 10 & 11 

  Source Units:                Meters 

  Source Scale:                1:100,000 

  Capture Method:              Scanned, digitized 

  

  Conversion Software:         ArcInfo rev 5.0.1 

  Data Structure:              Vector

  ArcInfo Coverage Type:      NET (Line, polygon) 

  ArcInfo Precision:          Double 

  ArcInfo Tolerances:         0 to 200 meters

  Number of Features:          16,077

  Layer Size:                  116.970 MB

  Data Updated:                September 1993 (added RF3 line feature table)

                               (other unscheduled updates have been made,

                               see original log file in Teale workspace)

  

DATA DICTIONARY:

  

      DATAFILE NAME: JHYSA.AAT   where xx = tile code (see index)  

      RECORD LENGTH:     98

  

  Non-standard LINE attribute fields:

  

  COLUMN   ITEM NAME WIDTH    OUTPUT   TYPE     N.DEC 

  -------------------------------------------------------------

  33       MAJOR1        4        6      B        -

  37       MINOR1        4        6      B        -

  41       MAJOR2        4        6      B        -

  45       MINOR2        4        6      B        -

  49       MAJOR3        4        6      B        -

  53       MINOR3        4        6      B        -

  57       MAJOR4        4        6      B        -

  61       MINOR4        4        6      B        -

  65       MAJOR5        4        6      B        -

  69       MINOR5        4        6      B        -

  73       FLOW          1        1      I        -

  74       HSCKEY        6        6      I        -

  80       HYSNUM        2        2      I        -

  82       RF3RCHID     17       17      C        -

 

  NOTE: Items common to all LINE coverages: FNODE#,   

  TNODE#, LPOLY#, RPOLY#, LENGTH, JHYSA# and    

  JHYSA-ID are not described here; with one exception:



  JHYSA-ID: where User ID negative (<0), arc is an artificial 

                neatline (coverage or tile boundary).



  FLOW: If equal to 1, flow direction is defined; if equal  

        to 0, no direction is defined.

  

  HSCKEY: Unique sequence number. Item was created for EPA's  

          Reach File System. Use HSCKEY to relate to the RF3

          DS2 data file of a given tile (see HYSNUM below).



  

  HYSNUM: Hydrography quad tile sequence number; 1 through 33.  

          Item was created for EPA's Reach File System; combine

          with HSCKEY to uniquely code features across tiles.

  

	  NOTE: DFG version: HYSNUM = HYSNUM(Teale) + 10

	  This is not yet reflected in the item UPDTSRC1 below.



  RF3RCHID: Primary key of RF3; concatenates CU, SEG, MILE;

            see desrcription of JHYSA.DS2 files below.



  MAJOR1-5: Major codes denote hydrography (code 50) as the major 

            feature category to which a line element belongs (as 

            opposed to property boundaries, roads, etc within DLGs).



  MINOR1-5: Minor codes assign up to five descriptive subcategories 

            to any single hydrography line element.

  

                Major    Minor

                Code #   Code #   Element Description

                ------   ------   -------------------

                50       200      Shoreline

                50       201      Man-made shoreline

                50       202      Closure line

                50       203      Indefinite shoreline

                50       204      Apparent Limit

                50       205      Outline of a Carolina bay

                50       206      Danger curve

                50       400      Rapids

                50       401      Falls

                50       402      Gravel pit/quarry filled w/water

                50       403      Gaging station

                50       404      Pumping station

                50       405      Water intake

                50       406      Dam or weir

                50       407      Canal lock or sluice gate

                50       408      Spillway

                50       409      Gate(flood,tidal,head,check)

                50       410      Rock

                50       411      Crevasse

                50       412      Stream

                50       413      Braided stream

                50       414      Ditch or canal

                50       415      Aqueduct

                50       416      Flume

                50       417      Penstock

                50       418      Siphon

                50       419      Channel in water area

                50       420      Wash or ephemeral drain

                50       421      Lake or pond

                50       422      Coral reef

                50       423      Sand in open water

                50       424      Spoil area

                50       425      Fish ladders

                50       601      Underground

                50       602      Overpassing

                50       603      Elevated

                50       604      Tunnel

                50       605      Right bank

                50       606      Left bank

                50       607      Under construction

                50       608      Salt

                50       609      Unsurveyed

                50       610      Intermittent

                50       611      Abandoned or discontinued

                50       612      Submerged or sunken

                50       613      Wooded

                50       614      Dry

                50       615      Mineral or hot (sulphur,alkali,etc.)

                50       616      Navigable transportation

                50       617      Underpassing

                50       618      Earthen construction

                50       000      Photorevised feature

               05N       ---      Water surface elevation, actual or

                                  interpolated.

                                  N = elevation units

                                  1=feet

                                  2=meters                  

                                  6=feet below datum

                                  7=meters below datum



               053       ---      Angle of clockwise rotation (nearest 

                                  whole degree)

               055       ---      River mile, value in four spaces, right 

                                  justified

               058       000      Best estimate of classification or

                                  position

               059       0--      Coincident feature

  

DATA DICTIONARY:

  

      DATAFILE NAME: JHYSA.DS2   where xx = tile code (see index)

      RECORD LENGTH:     450

  

  Non-standard LINE attribute fields:

  

  COLUMN   ITEM NAME  WIDTH  OUTPUT  TYPE  N.DEC   DESCRIPTION

  ---------------------------------------------------------------

    1 CU           8      8      I     -   Catalog Unit

    9 SEG          4      4      I     -   Segment No.

   13 MILE         5      5      N     2   Mile Point

   18 UPMI         5      5      N     2   Upstream Mile Pt.

   23 RFLAG        1      1      C     -   Reach Flag

   24 OWFLAG       1      1      C     -   Open Water Flag

   25 TFLAG        1      1      C     -   Terminal Flag

   26 SFLAG        1      1      C     -   Start Flag

   27 REACHTYPE    1      1      C     -   Reach Type Code

   28 LEVEL        2      2      I     -   Stream Level

   30 JUNC         2      2      I     -   Downstream Rch Lvl 

   32 DIVERGENCE   1      1      I     -   Divergence Code

   33 USDIR        1      1      C     -   Upstream Direction

   34 TERMID       5      5      I     -   Terminal Stream ID

   39 TRMBLV       1      1      I     -   Terminal Base Level

   40 PNAME       30     30      C     -   Primary Name

   70 PNMCD       11     11      C     -   Primary Name Code

   81 CNAME       30     30      C     -   Complement Name

  111 CNMCD       11     11      C     -   Complement Name Code

  122 OWNAME      30     30      C     -   Open Water Name

  152 OWNMCD      11     11      C     -   Open Water Name Code

  163 DSCU         8      8      I     -   Downstream CU

  171 DSSEG        4      4      I     -   Downstream SEG

  175 DSMI         5      5      N     2   Downstream MI

  180 CCU          8      8      I     -   Complement CU

  188 CSEG         4      4      I     -   Complement SEG

  192 CMILE        5      5      N     2   Complement MI

  197 CDIR         1      1      C     -   Complement Direction

  198 ULCU         8      8      I     -   Upstream Left CU

  206 ULSEG        4      4      I     -   Upstream Left SEG

  210 ULMI         5      5      N     2   Upstream Left MI

  215 URCU         8      8      I     -   Upstream Right CU

  223 URSEG        4      4      I     -   Uppstream Right SEG

  227 URMI         5      5      N     2   Upstream Right MI

  232 SEGL         6      6      N     2   Reach Length (Miles)

  238 RFORGFLAG    1      1      I     -   RF Origin flag(1-3)

  239 ALTPNMCD     8      8      I     -   Alt. Prime Name Code

  247 ALTOWNMC     8      8      I     -   Alt. OW Name Code

  255 DLAT         8      8      N     4   Downstream Latitude

  263 DLONG        8      8      N     4   Downstream Longitude

  271 ULAT         8      8      N     4   Upstream Latitude

  279 ULONG        8      8      N     4   Upstream Longitude

  287 MINLAT       8      8      N     4   Minimum Latitude

  295 MINLONG      8      8      N     4   Minimum Longitude

  303 MAXLAT       8      8      N     4   Maximum Latitude

  311 MAXLONG      8      8      N     4   Maximum Longitude

  319 NDLGREC      4      4      I     -   No. of DLG Records

  323 Ln1AT2       4      4      I     -   DLG Line Attribute 1

  327 Ln2AT2       4      4      I     -   DLG Line Attribute 2

  331 AR1AT2       4      4      I     -   DLG Area Attribute

  335 AR1AT4       4      4      I     -   DLG Area Attribute

  339 AR2AT2       4      4      I     -   DLG Area Attribute

  343 AR2AT4       4      4      I     -   DLG Area Attribute

  347 UPDATE1      6      6      C     -   Updt Date #1(MMDDYY)

  353 UPDTCD1      8      8      C     -   Updt Type Code #1

  361 UPDTSRC1     8      8      C     -   (This field set to           

                                           correspond to Teale 

                                           DLG dataset ids-See          

                                           HYSNUM and HSCKEY)

					   see DFG version above



  369 UPDATE2      6      6      C     -   Updt Date #2(MMDDYY)

  375 UPDTCD2      8      8      C     -   Updt Type Code #2

  383 UPDTSRC2     8      8      C     -   Updt Source #2

  391 UPDATE3      6      6      C     -   Updt Date #3(MMDDYY)

  397 UPDTCD3      8      8      C     -   Updt Type Code #3

  405 UPDTSRC3     8      8      C     -   Updt Source #3

  413 DIVCU        8      8      I     -   Divergent CU

  421 DIVSEG       4      4      I     -   Divergent SEG

  425 DIVMI        5      5      N     2   Divergent MI

  430 DLGID        6      6      I     -   DLG Number (special          

                                           use) 

  436 FILLER       7      7      C     -   Filler for Future use

  443 HSCKEY       6      6      I     -   (Added by Teale-             

                                           Value is same as last 6 digits 

                                           of UPDTSRC1-          

                                           Relate key to the AAT file)

  449 HYSNUM       2      2      I     -   (Added by Teale-             

                                           Value same as first 2  digits 

                                           of UPDTSRC1- 

                                           Hydro quad sequence number 1-33;

					   in DFG version, 11-43, see

					   description above)



      ** REDEFINED ITEMS **

    1 RF3RCHID    17     17      C     - (Reach number that              

                                         uniquely identifies all reaches)

  

  

DATA DICTIONARY:

  

      DATAFILE NAME: JHYSA.PAT   

      RECORD LENGTH:     56

  

  Non-standard POLYGON attribute fields:

  

  COLUMN   ITEM NAME   WIDTH   OUTPUT    TYPE     N.DEC 

   25      MAJOR1          4        6       B        -

   29      MINOR1          4        6       B        -

   33      MAJOR2          4        6       B        -

   37      MINOR2          4        6       B        -

   41      MAJOR3          4        6       B        -

   45      MINOR3          4        6       B        -

   49      MAJOR4          4        6       B        -

   53      MINOR4          4        6       B        -

  

  NOTE:    Items common to all POLYGON coverages: AREA, 

           PERIMETER, JHYSA# and JHYSA-ID are not 

           described here.

  

  MAJOR1-4: Major codes denote hydrography (code 50) as the major 

            feature category to which an area element belongs. 



  MINOR1-4: Minor codes assign up to four descriptive subcategories 

            to any single hydrography area element.



                Major    Minor

                Code #   Code #   Element Description

                ------  -------   -------------------

                  50      100      Alkali flat

                  50      101      Reservoir

                  50      102      Covered reservoir

                  50      103      Glacier or permanent snowfield

                  50      104      Salt evaporator

                  50      105      Inundation area

                  50      106      Fish hatchery or farm

                  50      107      Industrial water impoundment

                  50      108      Area to be submerged

                  50      109      Sewage disposal pond/filtration bed  

                  50      110      Tailings pond

                  50      111      Marsh, wetland,swamp,bog

                  50      112      Mangrove area

                  50      113      Rice Field

                  50      114      Cranberry bog

                  50      115      Flats(tidal,mud,sand,gravel)

                  50      116      Bays,estuaries,gulfs,oceans,seas

                  50      117      Shoal

                  50      118      Soda evaporator

                  50      119      Duck pond

                  50      400      Rapids

                  50      401      Falls

                  50      402      Gravel pit/quarry filled w/water

                  50      403      Gaging station

                  50      404      Pumping station

                  50      405      Water intake

                  50      406      Dam or weir

                  50      407      Canal lock or sluice gate

                  50      408      Spillway

                  50      409      Gate(flood,tidal,head,check)

                  50      410      Rock

                  50      411      Crevasse

                  50      412      Stream

                  50      413      Braided stream

                  50      414      Ditch or canal

                  50      415      Aqueduct

                  50      416      Flume

                  50      417      Penstock

                  50      418      Siphon

                  50      419      Channel in water area

                  50      420      Wash or ephemeral drain

                  50      421      Lake or pond

                  50      422      Coral reef

                  50      423      Sand in open water

                  50      424      Spoil area

                  50      425      Fish ladders

                  50      601      Underground

                  50      602      Overpassing

                  50      603      Elevated

                  50      604      Tunnel 

                  50      605      Right bank

                  50      606      Left bank

                  50      607      Under construction

                  50      608      Salt

                  50      609      Unsurveyed

                  50      610      Intermittent

                  50      611      Abandoned or discontinued

                  50      612      Submerged or sunken

                  50      613      Wooded

                  50      614      Dry

                  50      615      Mineral or hot (sulphur, alkali,etc.)

                  50      616      Navigable transportation

                  50      617      Underpassing

                  50      618      Earthen construction

                  50      000      Photorevised feature

  

DATA QUALITY ASSESSMENT:

  

The following are subjective comments regarding this data.

  

The USGS DLG features of this layer are fairly complete.  The density of 

line work representing drainage networks appears to vary arbitrarily from

quad to quad, and there are discontinuities in lines depicting streams at 

the edges of 100k quads.  The geographic feature accuracy is fair. 

Contiguous features are not always matched across map sheet boundaries. 

The attribute completeness and accuracy is good.  



The US EPA River Reach file as archived at Teale is an alpha release 

(prototype).  As such, users are cautioned to verify drainage network 

connectivity and water feature names before undertaking extensive 

processing using RF3 data.



The southern portion of Santa Rosa Island (Teale tile svjhysa) does not

have a corresponding RF3 file (expect svjhysa.ds2 in early 1996).

  

SUPPLEMENTARY INFORMATION (courtesy of Department of Fish & Game)



In 1993, US EPA changed the DS2 file designator to DS3 and

changed the MILE and related items from numeric type to character

type.  No data content changes were made.  At this writing, the

hydrography layer is archived with the DS2 files.



The DS2 / DS3 item UPDTSRC1 concatenates HYSNUM and HSCKEY for

those records that have a corresponding AAT record. UPDTSRC1 

contains the value 9999 for DS2 / DS3 records created

by US EPA that have no corresponding record in the hydrography

layer. UPDTSRC1 contains leading zeroes for single-digit HYSNUM values.

(see DFG version of HYSNUM described above)



INDEX TO 1:100,000 DLG HYDROGRAPHY 



ArcInfo coverage names are composed of the prefixes shown in the statewide

grid below (some are abbreviations of the USGS 1:250,000-scale quad map 

series names), plus the suffix JHYSA for the line and polygon data layers 

(for example, RDJHYSA, for the Redding quad).   



The item HYSNUM in the ArcInfo feature attribute tables contains the 

indicated numeric values to reference the tile within which a given 

feature falls.



DFG version of diagram below modified by adding 10 to each original

Teale HYSNUM value (see description at top of file).



                                        DFG-HYSNUM  QUAD NAME

      126   124   122   120W                  

  42N   _____ OREGON _____                      11 CRESCENT CITY

       | ZF  | WE  | AC  |                      12 WEED

       | 11  | 12  | 13  | N                    13 ALTURAS

  41   |_____|_____|_____| E                    14 EUREKA

       | EA  | RD  | XJ  | V                    15 REDDING

       | 14  | 15  | 16  | A                    16 SUSANVILLE

  40   |_____|_____|_____| D                    17 UKIAH

             | UK  | CQ  | A                    18 CHICO

             | 17  | 18  |    118               19 SANTA ROSA

       39    |_____|_____|_____                 20 SACRAMENTO

             | X9  | SO  | WK  |                21 WALKER LAKE

             | 19  | 20  | 21  |    116         22 SAN FRANCISCO

       38    |_____|_____|_____|_____           23 SAN JOSE

             | SF  | SJ  | MZ  | GU  |          24 MARIPOSA

             | 22  | 23  | 24  | 25  |          25 GOLDFIELD

       37    |_____|_____|_____|_____|          26 (no USGS name)

             | SX  | ZP  | FO  | DV  |          27 MONTEREY

             | 26  | 27  | 28  | 29  |    114   28 FRESNO

       36    |_____|_____|_____|_____|_____     29 DEATH VALLEY

                   | SL  | BF  | TJ  | KI  |    30 SAN LUIS OBISPO

                   | 30  | 31  | 32  | 33  |    31 BAKERSFIELD

             35    |_____|_____|_____|_____| A  32 TRONA

                   | SM  | LA  | SB  | NE  | R  33 KINGMAN

                   | 34  | 35  | 36  | 37  | I  34 SANTA MARIA

             34    |_____|_____|_____|_____| Z  35 LOS ANGELES

                   | SV  | LB  | SN  | S6  | O  36 SAN BERNARDINO

                   | 38  | 39  | 40  | 41  | N  37 NEEDLES

             33    |_____|_____|_____|_____| A  38 SANTA ROSA ISLAND

                            |    SD  | EL  |    39 LONG BEACH

                            |    42  | 43  |    40 SANTA ANA 

                   32       |--------------|    41 SALTON SEA

                                  MEXICO        42 SAN DIEGO

                                                43 EL CENTRO



Each quad covers an area one degree of latitude by two degrees of

longitude, except as noted: ZF, WE, AC, XJ, and CQ coverage

boundaries have been extended to include hydrographic features

between the quad lines and the State Boundary; SD and SV include

Channel Islands; no Teale data beyond the Mexico border (---).



See the coverage hydroindexa in /tlib/hydro for a gis version of 

this index map.



The DFG version of the index is dfghost:/tsb/dfgbase/hydro/indxhysa



DATA CONTACTS:

  

Contact Name:      Virginia Wong-Coppin (Teale Data Center)

Contact's Phone:   916-263-1489



Contact Name:      Paul Veisze (Department of Fish & Game)

Contact's Phone:   916-323-1667



Contact Name:      Michael Byrne (Department of Fish & Game)

Contact's Phone:   916-654-7631



Revised October 1995.

Revised November 1995.



-----------------------------------------------------------------------

APPENDIX.C



/*flow.aml

/*arcedit aml to correct direction of all hydro arcs

/*written by mike byrne

/*jan 10, 1996

/*each arc will end up with a unique value in the minor5 item

/*the head water arc, will have the greatest number and the outflow = 1

/*this aml has some limitations and is in beta format

/*arguments

/*   pnmcd	= the pname code, distinct for each stream

/*variables

/*in order of appearance

/*   .totnum 	= the total number of arc in a named stream (incl. islands) 

/*   cnt	= a counting variable to catch the headwater arc

/*   numsel	= the number of currently selected arcs

/*   .tnode	= the tnode# of the present arc

/*   .ptnode	= the previous tnode#, should be the fnode# of present arc

/*   pkey	= the primary key item of the currently selected arc

/*routines

/*   error

/*   failed

/*sub-amls

/*   lake

&args pnmcd pkey .totnum         /*an argument of pnmcd,pkey/.totnum optional

&if [null %pnmcd%] &then &call flowusage    /*if no argument call usage

/*&if ^ [iteminfo [show ec] -[show ef] %pkey% -exists] &then &call noitem

&if [show ef] ne ARC &then ef arc

&severity &error &routine failed            /*if error call failed r. 

&s ow1 = [open stream.error ostat -append]

&mess &off

&s .ptnode = null

sel pnmcd cn [quote %pnmcd%]                /*select all streams of same name

&if [null %.totnum%] &then &s .totnum = [show number select]/*find # arcs/stream

  &else res minor5 = 0                      /*to pick up where error left off

&if [show number select] <> %.totnum% &then 

&do

  &type nothing left to do

  &return

&end

calc minor5 = 0                             /*initialize minor5

&if ^ [null %pkey%] &then sel pkey = %pkey% 

  &else res dangle

&if [show num select] ne 1 &then            /*if only 1, good procede

   &call failed                             /*if more than one dangle, fail

&s cnt = 0                                  /*initalize count variable

&type begining PNMCD [unquote %pnmcd%] with %.totnum% arc(s)

&do &while  %.totnum% gt 0                   /*do once for every arc in stream

  &s numsel = [show number select]          /*show num selected

  &s .tnode = [show arc [show select 1] item tnode#] /*set head of arc

  &if %cnt% = 0 &then                       /*special case for headwater arc

  &do

    &s pkey = [show arc [show select 1] item pkey]

    sel ( fnode# = %.tnode% or tnode# = %.tnode% ) and pkey ne %pkey%

    &if [show number select] = 0 &then      /*if no arc attached to front

    &do

      sel pkey = %pkey%                    /*select arc

      flip                                  /*flip arc

    &end

    sel pkey = %pkey%

    &s .ptnode = [show arc [show select 1] item fnode#]

    &s .tnode = [show arc [show select 1] item tnode#]

  &end                                      /*end headwater arc loop

  &if %numsel% gt 1 &then &run lake %pnmcd% /*open water special case

  &if %.tnode% = %.ptnode% &then flip       /*if head = tail, flip

  calc minor5 = %.totnum%                   /*calc minor5 to count

  &s .totnum = %.totnum% - 1                /*next lowest

  &s .ptnode = [show arc [show select 1] item tnode#] /*set tail of next arc

  asel connect                              /*find all arc connected

  res minor5 = 0 and pnmcd cn [quote %pnmcd%]/*find the next downstream arc

  ds                                        /*draw it

  &s cnt = %cnt% + 1                        /*set count variable

&end

coo mouse

&mess &on

&s clf = [close %ow1%]



&return                         

&routine flowusage                          /*usage routine

  &type USAGE: flow  

  &type             {primary key of headwater arc} {number left to do}

  &return; &return



&routine failed                             /*failed routine

  &s wo1 = [write %ow1% [quote %pnmcd%,%.ptnode%]]

  &s clf = [close %ow1%]

  &type %pnmcd% failed at node %.ptnode%, try again

  coo mouse 

  &mess &on

  &return; &return



&routine noitem

  &type item PKEY does not exists in [show ec] for [show ef]S

  &type exiting ...

  &return; &return 

-----------------------------------------------------------------------



/*lake.aml

/*arcedit aml to correct direction of all hydro arcs

/*written by mike byrne

/*jan 12, 1996

/*this aml is called by the flow.aml to run fixes on double lined streams

/*and lakes.  only new variables are describe here. the variable of the

/*pnmcd is passed as an argument, and .ptnode and .tnode are globals

/*variables

/*in order of appearance

/*   lpoly 	= the poly # of the polygon on the left of the selected arc

/*   rpoly	= the poly # of the polygon on the right of the selected arc

/*   poly	= the poly # of the polygon inside the selected arcs

/*   startl	= the tnode# of the inflow arc to a lake

/*   vtn	= number of vertices along selected arc

/*   vtx	= the x coordinate of center vertex of the selected arc

/*   vty	= the y coordinate of center vertex of the selected arc

/*   path1,2	= the x,y coor pair of two diferent paths around open water

/*   pathf	= the x,y coor pair of the outflow arc

/*   l1,2	= the lengths of each path around an open waterway

/*   lp		= either 1 or 2 for shortest path around a waterway

/*   spath	= number of arcs on the shortest path

/*routines

/*   error

/*   failed

&args pnmcd

calc minor5 = -1                              /*first two lake arcs

&s lpoly = [show arc [show select 1] lpoly#]  /*find out the lake poly #

&s rpoly = [show arc [show select 1] rpoly#]

&if %lpoly% ne 1 &then &s poly = %lpoly%

  &else &s poly = %rpoly%

coor key                                      /*set coo to keyboard

&s startl = %.ptnode%                          /*initialize lake start node

&do i = 1 &to 2                               /*find middle vertex of each

  &s vtn [show arc [show select %i%] npnts]

  &sel [mod %vtn% 2]

    &when 1         /*   Odd count, get X,Y coordinate of middle vertex!

  &s path%i% [show arc [show select %i%] vert [ca [trunc [ca %vtn% / 2]] + 1]]

    &when 0

    &do

      &s vt1 [show arc [show select %i%] vert [ca %vtn% / 2]]

      &s vt2 [show arc [show select %i%] vert [ca [ca %vtn% / 2] + 1]]

      &s vtx [ca [ca [ext 1 %vt1%] + [ext 1 %vt2%]] / 2]

      &s vty [ca [ca [ext 2 %vt1%] + [ext 2 %vt2%]] / 2]

      &s path%i% = %vtx%,%vty%

    &end

  &end

&end                                          /*end do

sel lpoly# = %poly% or rpoly# = %poly%        /*find entire lake

calc minor5 = -1

&s lakenum = [show num select]

asel connect

res pnmcd cn [quote %pnmcd%] and minor5 = 0   /*find exit arc

&if [show num select] gt 1 &then 

&do                                           /*lake into doubel

  res ( lpoly# ne %poly% or rpoly# ne %poly% ) and minor5 = -1

  &if [show num select] = 0 &then

  &do                                         /*one poly into another

    sel lpoly# = %poly% or rpoly# = %poly%

    asel connect

    res pnmcd cn [quote %pnmcd%] and minor5 = 0

  &end

&end

&if [show num select] = 0 &then

&do                                          /*double line exit at confluence

  sel lpoly# = %poly% or rpoly# = %poly%

  asel connect

  res pnmcd ne [quote %pnmcd%]

&end

&sv vtn [show arc [show select 1] npnts]

&sel [mod %vtn% 2]

  &when 1         /*   Odd count, get X,Y coordinate of middle vertex!

    &s pathf [show arc [show select 1] vert [ca [trunc [ca %vtn% / 2]] + 1]]

  &when 0

  &do

    &s vt1 [show arc [show select 1] vert [ca %vtn% / 2]]

    &s vt2 [show arc [show select 1] vert [ca [ca %vtn% / 2] + 1]]

    &s vtx [ca [ca [ext 1 %vt1%] + [ext 1 %vt2%]] / 2]

    &s vty [ca [ca [ext 2 %vt1%] + [ext 2 %vt2%]] / 2]

    &s pathf = %vtx%,%vty%

  &end

&end

&do i = 1 &to 2                               /*compare paths, take shorter

  sel path                                    /*paths around lake first

    [value path%i%]

    %pathf%

    &s l%i% = 0

  &do j = 1 &to [show num select]

    &s l%i% = [value l%i%] + [show arc [show select %j%] item length]

  &end

&end                                           /*end path compare loop

&if %l1% lt %l2% &then &s lp = 1

  &else &s lp = 2                              /*take shorter path

sel path

  [value path%lp%]

  %pathf%

calc minor5 = 0

&s spath = [show number select] - 1           /*# of arcs on short side

res

  [value path%lp%]

&s .tnode = [show arc [show select 1] item tnode#]

&do j = 1 &to %spath%                           /*do shorter path correction

  &s pkey = [show arc [show select 1] item pkey]

  &s .tnode = [show arc [show select 1] item tnode#]

  &if %.tnode% = %.ptnode% &then flip

  calc minor5 = %.totnum% 

  &s .totnum = %.totnum% - 1

  &s .ptnode = [show arc [show select 1] item tnode#]

  asel connect

  res minor5 = 0 and pnmcd cn [quote %pnmcd%]

  ds

&end

&if %lp% = 1 &then &s lp = 2

  &else &s lp = 1

sel minor5 = -1

calc minor5 = 0

sel path minor5

  [value path%lp%]

  %pathf%

&s island = [calc %lakenum% - [calc %spath% + [calc [show num sel] - 1]]]

&if %island% gt 0 &then 

&do

  sel ( lpoly# = %poly% or rpoly# = %poly% )  and ~

    ( pnmcd cn [quote %pnmcd%] and minor5 = 0 )

  res lpoly# ne 1 and rpoly# ne 1  

  &do i = 1 &to [show num select] 

    &s pkey%i% = [show arc [show select %i%] item pkey]

  &end

  &do i = 1 &to [show num select] 

    sel pkey = [value pkey%i%]

    calc minor5 = %.totnum%

    &s .totnum = %.totnum% - 1 

  &end

&end

sel                                              /*selection for next run

  [value path%lp%]                               /*on longer side of lake

&s .tnode = [show arc [show select 1] item tnode#]

&s .ptnode = %startl%

coor mouse

&return



&routine failed                             /*failed routine

  &s wo1 = [write %ow1% [quote %pnmcd%,%.ptnode%]]

  &s clf = [close %ow1%]

  &type %pnmcd% failed at node %.ptnode%, try again

  coo mouse 

  &mess &on

  &return; &return; &return; &return

-----------------------------------------------------------------------

APPENDIX D



/*mkroute.aml

/*created by mike byrne

/*california dept. of fish and game 

/*inland fisheries division

/*sept 12, 1995

/*

/*this aml makes routes on a stream coverage

/*which has usepa river reach file 3 addresses

/*all related (not literally) files must/will

/*have a prefix of the cover input

/*

/*certain things must occur first

/*  1)the aat file must have the items rf3rchid

/*    pname, and pnmcd

/*  2)there MUST be 'flow' topology pointing DOWNstream

/*  

/* the section name will be the same as the route name

/* entered on the command line

/*

/* variables

/*     user input

/*        cov     - a coverage in the current directory

/*        route   - name of the route and section the program creates

/*      aml variables

/*        ro1/or1 - open/read variables

/*        r1stat  - status of read file used to control loop

/*        vtc     - the x,y coordinates of the second vertex on the

/*                  start arc for the route (each unique rf3rchid)

/*

/* files

/*     %cov%                user defined coverage

/*     tmp.join             aml created, sets up relate for event table

/*                          joined on to eventable and deleted

/*     zzmkroute            text file of unique routes written by info

/*                          and read by aml. this file contains the unique

/*                          values of the rf3rchids in the event table

/*     %cov%.evn            saved event environment

/*

&args cov route                            /*user defined arguments

&if [null %cov%] &then &call error         /*check arguments

&if [null %route%] &then &call error       /*check arguments

&s cov = [translate %cov%]

&s route = [translate %route%]

&if [show program] eq ARC &then arcedit

ec %cov% arc                               /*set edit coverage/feature

&s dv = [delete %cov%.rat%route% -info]    /*overwrite existing files

&s dv = [delete %cov%.sec%route% -info]    /*overwrite existing files

&s dv = [delete tmp.join -info]            /*overwrite existing files

&s dv = [delete %cov%.evn -info]           /*overwrite existing files

&data arc

  frequency %cov%.AAT tmp.join             /*create a unique list of rf3rchid

    pnmcd

    pname                                  /*frequency is done on event table

    end                                    /*for 1st arc (epa rf3 address)

    end

  quit

&end

&data arc info                             /*create ascii file to read of

  ARC                                      /*unique reaches/routes

  SEL TMP.JOIN

  RES PNMCD = '' or PNAME CN 'PACIFIC'

  PURGE

    Y

  OUTPUT ../ZZMKROUTE INIT

  LIST PNMCD,' ,' PRINT

  Q STOP

&end

&s clf = [close -all]

&s ow1 = [open error.zero owstat -write]

&s ow2 = [open error.multi owstat -write]

&s or1 = [open zzmkroute or1stat -read]   /*open unique reach file to read

&s ro1 = [read %or1% r1stat]   /*loop though and make route for each

&do &while %r1stat% = 0                 

  sel pnmcd = [quote [extract 1 [unquote %ro1%]]] /*select the entire stream

  res minor5 = 1                          /*reselect the handle arc

  &if [show num select] = 0 &then ~

      &s wo1 = [write %ow1% [extract 1 [unquote %ro1%]]]

  &if [show num select] gt 1 &then ~

      &s wo2 = [write %ow2% [extract 1 [unquote %ro1%]]]

  &if [show num select] = 1 &then 

  &do

    &s nvt = [show arc [show select 1] npnts]  /*find x,y on begining of arc

    &s vtc = [show arc [show select 1] vert %nvt%] /*find x,y on begining of arc

    &if [trunc [before %vtc% ,]] = [before %vtc% ,] &then ~ /*check to make sure

    &s vtc = [before %vtc% ,].0,[after %vtc% ,]    /*x coord is real, Esri bug

    asel pnmcd cn [quote [extract 1 [unquote %ro1%]]]/*add all reaches of STREAM

    makeroute %route% %vtc%                 /*make route starting at begining

  &end

  &s ro1 = [read %or1% r1stat]            /*loop back do next

&end

save

quit

joinitem %cov%.rat%route% tmp.join %cov%.rat%route% %route%# %route%-id link

&s dv = [delete tmp.join -info]           /*clean up

&s dv = [delete zzmkroute -file]

&s clf = [close -all]

&return                                         /*exit



&routine error

  &type USAGE: mkroute  

  &return; &return

-----------------------------------------------------------------------

REFERENCES

California Advisory Committee on Salmon and Steelhead Trout, 1971. _An Environmental Tragedy_. Progress report to the Legislature and Department of Fish and Game.

California Advisory Committee on Salmon and Steelhead Trout, 1986. _The Tragedy Continues_. Progress report to the Legislature and Department of Fish and Game. 36p.

California Advisory Committee on Salmon and Steelhead Trout, 1988. _Restoring the Balance_. Progress report to the Legislature and Department of Fish and Game. 84p.

Esri, 1991. _Dynamic Segmentation Modeling linear features_. Esri, 1991.

California Department of Fish and Game, 1991. California Salmonid Stream Habitat Restoration Manual. The State of California Resources Agency, 1994.


Michael Byrne CA Department of Fish and Game 1416 9th Street Sacramento, CA 95814 (916) 654-7631 mbyrne@dfg.ca.gov