Exercise 1: Introduction to ArcView
Hydro GIS Short Course
University of Padua
Spring 2000
Prepared by David
Tarboton, Utah State University.
Table of Contents
Brief Overview of ArcView
ArcView is a software program, developed by Environmental
Systems Research Institute (ESRI), which is used to do GIS analysis.
It differs from ArcInfo in that ArcInfo is designed to develop GIS data
while Arcview is designed to interact with GIS data which has already been
created.
All activities within Arcview are organized with a Project, which
may consist of a number of Views, Tables, Charts, Layouts and Scripts
(Scripts are programs in the Avenue language and this exercise does not
include user-defined scripts). The functions of Arcview include: displaying
coverages in a view, viewing the related attribute tables of these coverages,
relating attribute tables using a key field, plotting charts to display
spatial information, and creating layouts of the view and related tables
and charts.
Goals of the Exercise
-
To serve as an introduction to Arcview
-
To give you experience in working with Views, Tables, Charts, and Layouts
in Arcview
-
To produce a layout on which is shown a map connected to charts of data
measured at locations on the map.
Computer and Data Requirements
To carry out this exercise, you need to have access to a computer which
runs Arcview, version 3.0 or later. You need to download the following
themes:
-
A shape file of part of the Idaho flow network (U.S. EPA reach files, 17050103.shp).
-
A shape file giving the outline of Reynolds Creek (rcout.shp)
-
A table of annual rainfall data called reyrain.txt.
-
A digital elevation model grid file called reydem.asc.
The themes which you need to complete this exercise consist of several
files: rcout.shp, rcout.shx, rcout.dbf, 17050103.shp,
17050103.shx,
17050103.dbf,
reydem.asc,
reyprecip.asc.
You can get them from this Winzip file: ex1.zip which
you have to unzip using the Windows utility Winzip. Unzip all the
files into a single directory. For illustrative purposes I will assume
this directory is 'c:\giscourse\reydata\' (See here if you want to
learn more about the data sources.).
You are encouraged to do this exercise with data from Italy if you can
locate equivalent data.
Procedure
Please Note: The following procedure is a general outline which can
be followed to complete this lesson. However, the user is encouraged to
experiment with the program and be creative.
1. Start Arcview
Execute ArcView on your machine. On PC's this can be done by clicking on
the Arcview Icon in the Program Manager Window.
When ArcView is first executed, a new untitled Project window
is opened (click cancel when prompted to open a new view). This window
includes several icons marked Views, Tables, Charts, Layouts, and
Scripts.
This is the main Project window, which allows you to create new Views,
Charts, etc., or to open existing ones that you have already created in
that project.
Help! If you are lost and don't know how to do something, ArcView
has on-line help which is accessed by hitting the
symbol in the top right corner of the display window.
2. Display Themes in a View
Highlight the View icon in the Project window and click on New
for a new view (or double click on the View icon in the Project
window). Drag the view window out of the way and resize it if necessary.
From the File menu select set working directory and enter your working
directory (e.g. c:\giscourse\reydata). Add a new theme to the view
by clicking on the
(add theme) button on the top tool bar. Go to your local workspace
directory either by typing the directory name into the pathname box or
double-clicking on the directory with the mouse. Highlight the rcout.shp
coverages shown and click on OK to add it to your View. It will
each show up as a bar in the legend portion of the View window with the
name of the coverage shown on it. For the View you are working with, the
coverage rcout.shp is called a Theme.Click on the raised
box to the left of the Theme name rcout.shp to make a check mark
and see the coverage displayed in the View window. It should look
like the outline of a watershed.
Now we will add the rainfall data if file reydata.txt. Click on
the Project window and highlight the Tables icon. Click
on Add. At the bottom where it says 'List files of type' change the
dropdown menu to 'Delimited text (*.txt)'. Select the file named
'reyprecip.txt' and click OK. Now bring the View window to
the front by clicking on it, or if it is hidden use the 'Window' menu.
From the View menu select 'Add event theme'. In the X Field
select UTME and in the Y Field select UTMN. Click on OK. This
should show up on the bar in the legend portion of the View window.
Click on the raised part of the box to the left of the theme reyprecip.txt
to make a check mark to see the coverage displayed in the View window.
These are locations of raingauges.
Save the Project
The Legends for these Themes can be modified as described below. Once you've
got your Project set up, you can save it to a file by making the Project
window active and choosing the menu option File / Save Project.
The Project file that you save has the extension .apr and contains
information about the structure of your project, including the pathnames
to the data dislayed in it. The Project file is an ASCII file that can
be viewed with a text editor if you are curious about what it looks like.
It is wise to periodically save the Project as you carry out this exercise
so that you can recover all your work in the event that Arcview crashes
before you complete the exercise.
3. Adjust the Display of the Themes
The legend for a Theme can be adjusted by double-clicking on that Theme's
name. This brings up the Legend Editor. Adjust the coloring of a
theme by clicking on its Symbol box and using the
paint brush in the top right corner of the Color Palette which appears.
Select Apply in the Legend Editor to get the new color. You
can also use the same interface to adust marker symbol and size.
Close the Color Palette and Legend Editor boxes using the icon in their
upper right corner.
You can zoom in or zoom out from a portion of the View window using
or . To zoom to the extent
of active Themes, use the
tool in the upper row of the tool bar. A Theme is active if its legend
bar in the View window appears raised.
By clicking the icon in
the View tool bar and then clicking on a map feature in the View you can
find out information about any feature in the active Theme (a display of
its record in the data table). If you click on a feature and don't see
the correct record displayed, check to see that the correct theme is highlighted
in the View window legend bar.
Report the coordinates of the rain gage that is furthest west in
this set.
4. Open a Table
To View tabular information associated with a Theme, first activate the
Theme of interest by clicking on the Theme name in the legend bar of the
View window, then click on
in the top row of buttons to open the Table. By clicking on a row in a
Table you can highlight that row and the corresponding feature (precipitation
station location) in the map.
Notice how there is a one to one correspondence between a record in
the data table and a geographic feature in the map. This table-map linkage
is one of the key things that makes a GIS operate effectively. To make
sure that the row you've selected is easy to see, promote to the top of
the table using the icon.By
holding down the shift key you can highlight several features at once.
Selecting Features Geographically in the View
Geographic features from a particular theme can be selected graphically
by highlighting the theme, clicking on the
tool, and then selecting the features in the view. Again, by holding down
the shift key and you can add features to the set you've previously selected.
You can also drag a box over a region on the screen and select all the
features in that region. If you attempt to select features graphically
and don't succeed, check that you've clicked on the theme name in the legend
bar so that it is highlighted.
By clicking on the icon
you can unselect all records. By holding down the shift key and clicking
on a selected record, it will be unselected.
The data that you are examining are precipitation recorded between October
1992 and August 1993. The table contains summary data computed from
data recorded hourly. The attributes of the data, shown in column
in the data table, include the name of the station, the location in UTM
north and east coordinates and precipitation totals for the entire period
(in inches and mm) and for each month (in inches). You'll see that
the values for one station are very small, suggesting an error that needs
to be investigated.
Selecting Particular Fields in the Table
In large tables you can see all of the fields by scrolling to the right
using the scroll bar at the bottom of the Table. You can determine summary
statistics for a particular field by selecting that field (depressing its
header label) and then selecting Field/Statistics from the Menu
Bar. If you have records selected in the table, the statistics function
will summarise the statistics of these records only. If you want the statistics
of all the records to be summarised, make sure that you have cleared all
the selected records using the
button before calculating the statistics.
Report the mean total precipitation over this period for 10 Southernmost
gages. Select these using the
tool on the view, then open the theme table and select Field/Statistics.
5. Add Elevation Data
Analysis of grid digital elevation model (DEM) data requires the Spatial
Analyst Extension. In the project window, choose Extension
from File menu and check Spatial Analyst from the available extensions.
If you don't have the Spatial Analyst extension you will not be able to
complete this exercise.
The file reydem.asc contains digital elevation data on a 30 m
grid for Reynolds Creek. It is in an ASCII export format. In
a View window select the File menu Import Data Source. Select
import file type as ASCII raster and click OK. Select the file name
reydem.asc.
Give the output grid the name reydem, selecting the folder where
you would like the grid file to be saved. Respond NO to cell values
as integer (This data is actually integer data, but it is generally better
to treat elevation data as real). Respond YES to add grid as theme
to the view. The digital elevation model theme named reydem
should now be displayed. To show the watershed outline and raingauges
with this, drag the legend bar for the digital elevation model (reydem)
below that for the precipitation and outline themes. Dragging a theme is
accomplished by clicking beside the theme symbol, holding down the mouse
and dragging the box that appears.
Determine the elevation of each rain gauge. With the theme reyprecip.txt
selected (and no features selected )
choose Summarize by Zones from the Analysis menu. Pick
the field 'Name' to define zones and click OK. Pick the theme
'reydem' containing the variable to summarize and click OK.
Click CANCEL for selection of the statistic to chart. A table 'Stats
of Reydem Within Zones of Reyprecip.txt' is created. Since Reyprecip.txt
is a point theme, each zone is a point that can only have one elevation.
The table shows the elevation in four columns mean, min, max and
sum, with range and standard deviation 0. (If the field being summarized
had been a line or polygon theme then the concepts of min, max, range,
standard deviation and sum would have been non trivial). Edit this
table to clean it up. From the Table menu select Start
Editing. Fields (columns) may be selected by clicking on the
grey name at the top. Select and Delete (Edit/Delete Field) all fields
except 'Name' and 'Mean'. From Table/Properties set the alias 'elevation'
for the field 'mean'.
From the Table menu choose stop editing and save edits. Now join
this table to the reyprecip.txt table. First select the field 'name'
(by clicking on the grey name) in the table 'Stats of Reydem Within Zones
of Reyprecip.txt'. Then select the field 'name' in the 'reyprecip.txt'
table. Then choose Join from the Table menu.
You will see that the table 'Stats of Reydem Within Zones of Reyprecip.txt'
disappears and a new field (column) with the elevation data appears in
the table 'reyprecip.txt'. The table 'Stats of Reydem Within
Zones of Reyprecip.txt' has been joined to the table 'reyprecip.txt' using
the field 'name' as a key field. This join can be undone by choosing
Remove
All Joins from the Table menu. A table can be sorted by selecting
a field (clicking on the grey name) then clicking one of the sort buttons
for an ascending or descending sort. Sort the table by elevation and
report the name of the lowest elevation station.
6. Add River Reach File data and change the projection
The river reach information for this region is in the shape file 17050103.shp.
This is in geographic coordinates (latitude and longitude). The digital
elevation model, watershed outline and rainfall data we have so far displayed
is in UTM coordinates relative to the NAD27 datum (NorthAmerican Datum
1927). To display and analyze this data together the different coordinate
systems need to be reconciled. ArcView has the capability to project
from geographic coordinates to other coordinate systems (but not the other
way) so we will project the geographic coordinates onto UTM.
Open a new view, by double clicking on the Views icon
in the project menu. Add the 17050103.shp theme to this view (
add theme button). From the View menu select properties
Click on Projection and select category UTM -1927, type Zone
11. Click OK to the projection dialog and OK to the View Properties
dialog. You should notice a shift in the orientation of the displayed
reaches, and that the coordinates in the top left are now UTM (100,000's
of meters) rather than latitude and longitude (~100 degrees).
With the 17050103.shp selected from the Theme menu select Convert
to Shapefile. Give a new name (17050103utm.shp).
Say yes to the dialog to save in rojected units. Say OK to the message
about the converted shape not being added to the view.
Close the projected view (X at the top right) and open the first view
(with the basin outline, elevation and rainfall data). Add (
add theme button) the new theme 17050103utm.shp to this view.
The streams should match nicely with the watershed outline and topography.
Select the river network within the Reynolds Creek basin outline.
With the17050103utm.shp active (raised legendbar) choose Select
by Theme from the Theme menu. In the Select by Theme dialog
box, select features of active themes that Intersect the selected
features of Rcout.shp. Since Rcout.shp is a polygon shape
file this means that all reach segments which are within or intersect the
Reynolds Creek Basin will be selected.
Click New Set. You will see that all of the river reaches
that intersect the Rcout.shp are highlighted. Now with the17050103utm.shp
active (raised legendbar) and Reynolds Creek streams selected (Yellow)
choose Convert to Shapefile from the Theme menu. Provide
a name (reystreams.shp) for the new shapefile. You will see
that this comprises only the streams of Reynolds Creek Watershed.
7. Make a Chart
A chart can be plotted of one or more records selected from a table. Select
a particular gage record by clicking on its symbol on the view or its record
in the table. With the table open, double click on the Chart icon
in the Project window. At the pick a table prompt select the table
you are working with. (Beware - there are two tables, one named 'reyprecip.txt'
and one named 'Attributes of Reyprecip.txt' that was created when you added
the event theme. As you proceed with ArcView analyses you will see
that tables get added along the way by various operations and you need
to recognize this and delete ones no longer needed) Select the items from
the table to be added to the chart in the properties box and give the chart
a name. For our exercise, we wish to plot the monthly precipitation, so
highlight the months on the left hand side and click on the box labeled
Add.
Again, multiple fields can be selected by holding down the shift key.
Once this is done, click on the box labeled Add. After clicking
OK, a Chart will be plotted. You can change the form of the Chart using
items in the top tool bar.
The horizontal axis of the Chart is automatically labeled using the
field names you selected for plotting. If these are too long to fit on
the chart, you can make shorter aliases for these field names by making
the Table active, selecting the menu item Table / Properties, and
entering text into the column labeled Alias. For example, you can
replace the label Jan with J, etc.
To Edit Features of the Chart, select the Chart Edit tool
and then click on the feature you wish to Edit. You can change the nomenclature
of the legend and the chart title and location in this way.
If you hold down the shift key and highlight a second station in the
View or the Table, its data will be automatically added to the chart.
Here is a comparison between the P095 and P098 stations
8. Make a Layout
A Layout allows a user to combine Views, Tables, Charts, Legends, and Text
into one document for printing. To create a new Layout, double-click on
the icon in the Project
window. To work with a Layout, it is useful to enlarge the Layout window
(by dragging on the window corner(s) with the mouse). After enlarging the
window, click on the Zoom to page
tool to maximize use of the window space. As illustrated in the image below,
by clicking and holding the left mouse button on the furthest icon to the
right on the lower tool bar, you can add a number of different objects
to the Layout. From top to bottom, the objects that you can add are a View,
a Legend, a Scale, a North Arrow, a Chart, a Table, or a Graphic. After
selecting one of these items, you can draw a box on the Layout to specify
the location and size of the selected object.
Begin by selecting a view
and drawing a box to accomodate it. When you've drawn the box, a dialog
box will come up asking you to select the view to show in the box. Select
View1,
and you should see your view of Reynolds Creek show up.
You can add another object template to the layout using the right hand
side tool in the lowest row of the upper tool bar. Select the chart object
to add a chart. To connect the chart visually to the corresponding point
in the view using the draw tool
which is selected from the list of icons under the
button. When drawing the line you'll find that it automatically snaps the
end points of the line to the grid points shown in the Layout window. To
stop that happening, click off Snap to Grid in the Layout/Properties
window. In case you choose to add a scale bar (fourth icon down)
to your layout and get a grey bar that says 'Unknown Units: View 1' you
need to switch back to the view window and select properties from the view
menu. Then set the map units pull down menu to meters. When
you switch back to the Layout the scale bar should show units, which can
be adjusted by double clicking on it.
You can add text to a Layout using the
button. You can also draw points, lines, and polygons using .
If you find that the lines you are drawing are not in quite the right locations,
use Layout/Properties and click off the "Snap to Grid" box. To change
the size of the text you've added, highlight the text and use Window/Show
Symbol Palette and the text icon to alter the text size. Text size
of 14 point is the default. Usually 24 or 36 point looks good in layouts.
Similarly, to change the line thickness use the same pallete and select
the Line icon. Line thickness of 1 is the default. You can
directly print your layout from the Layout window, or you can export the
layout as a Placeable WMF (Windows MetaFile) and then import it into MS
Word using Insert/Picture/From File so that you can add a commentary on
what you did on the exercise.
9. Do Something Creative!!
Now that you are familiar with the operation of Arcview, make some new
maps, charts or tables of different variables or analyses that are of interest
to you. Some possibilities include:
-
Show where Reynolds Creek is on a map of North America or the World.
The data in c:\esri\esridata may help with this.
-
Calculate the drainage density (Length of channels divided by drainage
area).
-
Calculate the area average precipitation over the watershed. Methods
to do this might include
-
Thiessen polygons
-
Spatial interpolation (surface smoothing)
-
Developing a precipitation versus elevation relationship
10.To be Turned In
-
The coordinates of the rain gage that is furthest west in this set.
-
The mean total precipitation over this period for 10 Southernmost gages.
-
The name of the lowest elevation station.
-
A copy of your layout showing the map of Reynolds Creek and display
of precipitation data in some form.
-
Something creative.
Ok, you're done!
Some of this material is based on exercises prepared by David
Maidment at the Center for Research in Water Resources at the University
of Texas at Austin and used in his GIS in Water Resources Online course.
These materials may be used for study, research, and education, but
please credit the authors and the Utah Water Research Laboratory, Utah
State University. All commercial rights reserved. Copyright 2000 Utah State
University.