/* AML NAME: pointcov.aml (Run from the arc prompt)
/* FUNCTION: Creates a point coverage of flow gages within a specified
/* watershed or set of watersheds and attaches attribute data from input
/* ascii files to that coverage. Also projects the created coverage out of
/* geographic coordinates.
/* huccov - polygon coverage of USGS Hydrologic Unit Codes (HUCs) for a
/* particular state or region
/* rf1cov - arc coverage of EPA RF1 River Reach files for a particular
/* state or region
/* lonlat.dat - an ascii file of (in this order) sequence #', longitude,
/* and latitude (in decimal degrees). Values for these fields should be
/* delimited by spaces. An "End " statement should be included
/* following the last entry.
/* discharge.dat - an ascii file of (in this order) sequence #, flow gage ,
/* ID #, and any descriptive attributes desired for each gage/point
/* (e.g. gage name, mean annual flow @ gage, etc.). Fields should be
/* deilimited by spaces. An "End (Return)" statement should be included
/* following the last entry.
/* geoalb.prj - an ascii projection file to convert coverages in a
/* geographic coordinate system to the albers coordinate system.
/*An "End (Return)"statement should be
/* included following the last entry.
reselect huccov hucshed
/* creates new coverage hucshed from huccov according to criteria specified
/* in the following dialog.
res huc6 = xxxxxx /* where "xxxxxx" is the 6-digit HUC for a
/* particular watershed
/* Alternatively, a value for huc4 or huc2 may be specified to reselect
/* larger areas for which
/* associated flow gages may be available.
N /* a more complex query may be defined at this point with a Y
/* in place of the N and use of
/* the res, asel, or nsel reselect functions.
/* Repeat the above process to select the river reaches in the desired
/* watershed(s):
reselect rf1cov rf1shed line
res huc6 = xxxxxx /* identify the same reselect parameter(s) as for
/* hucshed
/* the following set of commands build a point coverage of flow gage
/* locations.
generate stations
/* invokes the "generate" function to create a coverage called "stations"
input lonlat.dat
/* uses an ascii input file for coordinates of locations
/* specifies a point coverage
build stations points
/* builds topology of point coverage (i.e. point attribute table)
addxy stations
/* adds lon and lat as attributes X-Coord and Y-Coord
/* the following commands add attribute data to the point coverage.
define attributes.dat
/* creates an Info file to accept attribute data. A field must be
/* created for each attribute in the discharge.dat file.
stations-id /* an attribute for the station sequence number
4 /* identifies 4 characters for item width
4 /* identifies 4 characters for item output width
i /* identifies integer data type
stat-num /* an attribute for the 8-digit USGS gage identifier
c /* identifies character data type
stat-name /* an attribute for the name of the station
annlflow /* an attribute for average annual flow at the station
n /* identifies real number data type
1 /* # of places after decimal point
add from discharge.dat /* the add from command fills the table attributes.dat with data from the
/* discharge.dat file.
joinitem stations.pat attributes.dat stations.pat stations-id stations-id
/* updates stations.pat with the data from attributes.dat, using stations-id as
/* the relate item and
/* adding the data after the stations-id item.
project cover stations albstats geoalb.prj
/* projects the coverage "stations" into an albers projection called "albstats"
/* using the projection file "geoalb.prj"
/*****************end of AML***************************************************

Go to AML Listing

Quick Connect to HUCs Web Site

Quick Connect to RF1 Web Site