GEO 465/565
Introduction to GIS
Lab 5 Substitute
Terrain Analysis With Raster Data in ArcView
The objectives of this lab are to explore various raster functions in ArcView and to practice importing data into Arcview.
1.0 Importing DEMs - Preparing Elevation Data for Arcview
Raster data are available in many different formats. You may often need
to convert your raster data into a format that can be read by your GIS.
This section discusses the converting of digital elevation models into
a format suitable for Arcview projects.
There is a three step process to importing raster data into an Arcview
project:
-
Download data onto your computer system.
-
Convert (if necessary) the data into your GIS's format.
-
Open the converted data into a view.
In class, we have already met the DEM or Digital Elevation Model topographic
data, supplied by the USGS and other agencies. For this assignment, the
first thing you must do is download a 7.5' digital elevation model (DEM)
from the USGS web site or other location. For a little more information
about DEMs see: http://edcwww.cr.usgs.gov/glis/hyper/guide/7_min_dem
Question
1.0
There are three important things you need to know about a DEM (or any
raster map):
-
Resolution
-
Location
-
Accuracy
Less "important" is extent: extent is easy to see when you open the DEM
in your GIS. Assuming the location of the DEM is appropriate, both resolution
and accuracy will help determine whether the DEM will be suitable for a
particular application. Accuracy is expressed in terms of RMSE or
root mean squared error. For a set of points, the elevation is measured
both on the DEM and on an independent source of greater fidelity.
As some errors are positive and some negative, the values are squared,
and averaged across all tested points. This value is in the same units
as the value being compared. For the elevation, just elevation is tested,
and given in meters. For positional error, the RMSE is normalized
over both x and y, much like the standard distance discussed in class.
Note that although vertical and horizontal error are measured separately,
they are actually closely related. It we don't match the right location,
we usually make an error in elevation too.
The next two figures show the accuracy standards of 7.5' DEMs available
for the continental U.S.
Figure 1, 7.5' DEMs with an RMSE of 0-7 meters (from USGS web page).
Figure 2, 7.5' DEMs with an RMSE of 7-15 meters (figure swiped from USGS web
page).
Now that we've reviewed what DEMs are all about, you are ready
to download the DEM that you will use for this lab.
Download, using "Save Link As", the Oregon DEM onto your machine. The file has already been formatted so that it will be readable by ArcView.
For future reference, you can find DEMs filed by quad name (quad name usually includes city name and state) at:http://edcftp.cr.usgs.gov/pub/data/DEM/7.5min/
. There are several other web sites that contain DEM files for regions
of the United States. More DEMs for the state of Oregon may be found at
www.sscgis.state.or.us/data/dems.html.
1.2 Loading the DEM file into Grid format using Arcview
-
Start up Arcview.
-
With the Project Window active, load the Spatial Analyst Extension
by pulling down File/Extensions..., clicking
on Spatial Analyst, and clicking on OK. Note: when you save a project with
an extension open, the extension will open whenever the project is opened.
-
Make a view active. Notice that there are now three new choices when you
pull down File: Manage Data Sources...,
Import Data Source..., Export Data Source...
(when a view is active).
-
Pull down File/Import Data Source.... When
you get a dialog box, scroll down to select USGS DEM, then click OK.
-
Browse to your home directory, and click on the file, then click OK.
-
You will be prompted for an output Grid Name for your dem, enter a suitable
grid name (and ensure that the new grid will be written to your hard disk)
then click OK. Please be patient, this conversion takes a few minutes.
-
You are then prompted to "Add grid as theme to View", click YES. Your grid
should now be added to the view.
-
Save the results to your home directory (you wouldn't want Arcview to "blow
up" on you now!).
The following screenshot shows the Oregon DEM (from a seven
and a half minute quadrangle near Bend) loaded into ArcView and
displayed as an active theme in a view.
The View/Add Theme... pulldown menu will
retain the same option for future queries. You will need to reset the menu
to "Feature Data Source" before reading vector themes again.
Once you have the Grid formated raster files, you can copy or move them
using File/Manage Data Sources...
1.3 Importing ASCII Grids into Grid format using Arcview
In addition to downloading a USGS DEM and getting it into your view, create
a new view and use it to display a portion of a U.S. Defense Mapping Agency
(DMA) One Degree DEM (Resolution is 3 arc seconds).
As you probably noticed, one of the options when importing files into
Arcview is ASCII Grids. ASCII Grid files are the easist way to currently
transfer files between other GIS and Arc/Info or Arcview (however, these
files will utilize the most disk space).
Download, once again, using "Save Link As", the ASCII Grid file 90as30.asc
into your home directory (by selecting File/
Save As.. ). The 90as30.asc file is a small, modified section
of a DMA One Degree DEM. Once you are through importing this data into
Arcview's grid format, it is a good idea to delete the file as it takes
up a lot of disk space. The DMA DEM has been resampled and interpolated
to 30 meters horizontal resolution.
Resolution, in the raster world, indicates how large individual cells
in the grids are and how precise the data within each cell is. Horizontal
resolution refers to the geographic distance individual grid cells cover.
Vertical resolution refers to variation of grid cell values. For example,
if a particular DEM only had elevation values 0m, 5m, 10m, 15m, 20m, ...,
the vertical resolution would be 5 meters.
Question 1.1
1.3.1 ASCII Grid file format
Open 90as30.asc in the text editor of your choice. Here are the
first six rows of the file:
ncols 792
nrows 836
xllcorner 224115
yllcorner 3810285
cellsize 30
nodata_value 0
The first six rows should be in this format. The ncols and
nrows indicate the number of columns and rows that are in the
grid. The nodata_value indicates which value refers to cells without
any data (for example, a hydrography map might have four categories: no
water, intermittent stream, perennial stream, and lake; as well as a no
data value indicating places where the category is unknown). The cellsize
is the resolution of individual cell -- both in its north-south direction,
as well as, its east-west direction. xllcorner and yllcorner
represent the lower left-hand corner (not the center of the lower left-hand
corner cell as some GIS specify) of the grid as shown in the following
figure:
Figure 3, Small grid
The rest of 90as30.asc contains the ncols * nrows of
cell values. In the file, each row contains one row's cells, although it
is not a requirement.
1.3.2 Importing ASCII Grid files (at last)
It's finally time to download the file. The procedure is nearly identical
to importing a DEM file and will be repeated for your convienence:
-
Start up Arcview (if necessary).
-
With the Project Window active, load the Spatial Analyst Extension with
the by pulling down File/Extensions..., clicking
on Spatial Analyst, and clicking on OK (if necessary).
-
Make a view active. Notice that there are now three new choices when you
pull down File: Manage Data Sources...,
Import Data Source..., Export Data Source...
(when a view is active).
-
Pull down File/Import Data Source.... When
you get a dialog box, scroll down to select ASCII Raster.
-
Browse to your home directory, and click on the file 90as30.asc,
then click OK.
-
You will be prompted for an output Grid Name for your dem, enter a suitable
grid name (and ensure that the new grid will be written to your hard disk),
then click OK.
-
You are then asked if to import "Cell values as integers?", click NO.
Please be patient, this conversion takes a few minutes.
-
You will now be prompted to "Add grid as theme to View", click YES. Your
grid should now be added to the view.
-
Save the results to your home directory.
1.4 Managing Grids in Arcview
The Grid format in Arc/Info requires software in order to copy, move or
delete the Grid themes. Arcview includes this functionality in File/Manage
Data Sources...
Grid files in a project are stored in the working directory (File/Set
Working Directory...). Make sure your working directory
is in an appropriate location. Your files will only be saved under
two circumstances:
-
Saving the project with the Grid themes in the project.
-
Pull down Theme/Save Data Set.
Since you will be making many temporary grid themes, remember to save your
project or Theme/Save Data Set whenever you
generate a useful grid theme.
1.5 Projecting DEM themes in Arcview views
Grids need to be projected just the same as vector maps. USGS DEMs and
many US maps use the universal transverse mercator (UTM) coordinate system
to locate the raster cells. (See Chapter 2, section 2.3.2 of your textbook,
"Getting
Started With GIS", for a description of the UTM coordinate system). After
you have added a DEM grid theme to a particular View, you should
set the view projection to UTM (in View/Properties...).
Your only complication is determining which UTM zone your data is in.The
90as30.asc and other ASCII files available for this lab are located
in UTM Zone 11.
As discussed in the text,
UTM zones are numbered from 1 to 60, which each zone 6 degrees of longitude
wide. The zones begin at 180 degrees west longitude and extend eastwards.
Thus, zone 1 is for data from 180 degrees W to 174 degrees W, zone 2 is
from 174 degrees W to 168 degrees W... Set the view projection to the appropriate
zone for your grid data.
2.0 Looking at continuous maps
In this section, you will explore your elevation theme. The first thing
you'll want to do with any grid theme is to look at its properties. With
the elevation theme active, pull down Theme/Properties....
Question
2.0.a
Question
2.0.b
Next, you'll want create a pleasing image of the elevation theme. Arcview
provides several ways to create good images for continuous maps: contours
and hillshading.
2.1 Contour Lines
Contours, traditionally used by Geographers, can be made with Surface/Create
Contours.... Go ahead and make a contour map of your
data.
Choose a contour interval that provides you with as much
information about the terrain as possible. Be careful not to
obscure the map with too many contour lines.
Note: there may be a button on the toolbar named "contour". This
button is NOT the Surface/Create Contours... function.
The contour button will create a shapefile of a single isoline with the
value of a spot clicked on the map.
2.2 Hillshade Images
Creating a hillshade image of a continuous scaled grid theme is a two part
procedure. First, generate a hillshade map for the active grid theme by
using: Surface/Compute Hillshade.../OK. Second,
double click on the active grid theme and click on Advanced...
in the Legend Editor. Scroll down to the generated hillshade map to define
the Brightness Theme and hit Apply on the legend Editor
window. As of Arcview 3.1, this is the closest Arcview gets to a three
dimensional surface, -- but it makes a decent output map.
Question
2.2.a
A nice feature of hillshading in Arcview is that since hillshading is
part of the legend, the DEM will retain the hillshading effect whenever
you want to view the DEM.
Question
2.2.b
2.3 Descriptive Functions for a single theme
Arcview has several ways of quantitatively describing information in a
raster map. One is the histogram function (in the toolbar). Another is
the Statistics button in the Legend Editor. Both do the obvious.
3.0 Raster Analysis
This section will provide several examples of raster analysis in ArcView, as well
as discuss general issues important to raster analysis.
3.1 Analysis Properties
As mentioned earlier, cell resolution should be considered before doing
any analysis. With an active view, click on Analysis/Properties....
You can then choose the resolution, and extents of analysis using various
techniques. For example, if you zoom in to the extent of the area you want
to analyze, pull down Analysis Extent and click on Same as
Display (NOT Same as View which sets the extent to the extent
of the themes in the view). It is a good idea to keep track of how long
a particular application takes for each type of analysis based on the number
of cells (ncols * nrows) in the analysis extent. That way, you don't start
running an application that will take 14 hours when you only have time
for 18 minutes. Arcview is SUPPOSED to have a stop button in the lower
right corner of the Arcview window. However, it might be minutes before
the button appears for an analysis.
3.2 Slope for Elevation (and all continuous maps)
The first derivative of a surface is often more important than the values
of the surface itself. For example, when hiking in the Northeast, the absolute
elevation doesn't matter at all (we're under the same relative stress at
350 meters as we are at 150 meters). However, hiking up a 30% slope is
far more difficult than a 3% slope.
3.2.1 Making a Slope map
To make a slope map in Arcview, make your surface map (in this case, your
USGS DEM) active. Pull down Surface/Derive Slope. And that's
it!
3.2.2 Understanding Slope
Do the following commands:
-
Rename the existing slope map (from 3.2.1) including the extent resolution
value in the name.
-
Double the resolution using Analysis/Properties....
-
Make another slope map with this greater resolution.
-
Rename the slope map from step 3 with the extent resolution value in the
name.
-
Make histograms from both slope maps (histogram button).
Compare the two histograms.
Question
3.2.2.a
3.3 Distance and Proximity
You are playing 18 rounds with Tiger Woods, Michael Jordon, and
the Governor of Illinois. After several spirited minutes of
discussing geography with the governor, he asks if its possible to estimate how
much of Illinois is relying on businesses in other states when purchasing
computer supplies and equipment. You whip out your laptop computer, which
contains Arcview, and proceed to put together the following analysis, while
Michael struggles in a sandtrap.
3.3.1 Distance analysis
Your first analysis is to roughly estimate the likelihood that computer
users in various parts of Illinois use mail order to buy computer equipment.
Use the following assumptions:
-
Computer stores are only available at cities with a population greater
than 20,000 people.
-
People will travel to the closest computer store.
-
Because Illinois is so boringly flat, you assume the time
it takes to travel between any two places is a linear function of distance.
-
80% of computer users living in a city with a computer store purchase supplies
from computer stores.
-
30% of computer users living 100 kilometers from a city with computer stores
shop at computer stores.
-
There is a inverse linear relationship between distance and the likelihood
of purchasing computer supplies at a computer store.
Prepare your analysis by doing the following:
-
Create a new view for this section.
-
Open a USA cities shapefile and a USA states shapefile in this new view
(Try the directory c:\esri\av_gis30\avtutor\arcview\qstart).
-
Join (c:\esri\av_gis30\avtutor\arcview\qstart) cidemog.dbf to the cities shapefile.
-
Select all cities with a population greater than 20,000.
-
Load the Spatial Analyst if its not already loaded.
-
Zoom into an area just larger than Illinois including any selected cities
that computer users in Illinois might travel to.
-
Set the Analysis Extent and Resolution using Analysis/Properties....
Set the distance to kilometers.
-
Set the resolution to one kilometer. Make sure the number of rows and columns
are reasonable numbers (1,000,000 cells can be quickly done on the current
computers).
And now your ready for some analysis! Your analysis is in two parts: generating
a distance map and calculating the likelihood that people within a distance
will purchase from a computer store.
-
With selected cities active, pull down Analysis/Find Distance
-
Pull down Analysis/Map Calculator to run the calculation:
(([Distance to Cities.shp] < 160.AsGrid) * (0.8.AsGrid - (0.005.AsGrid
* [Distance to Cities.shp])))
This represents the equation:
likelihood purchasing supplies = 0.8 - 0.005 * (km from city).
Read the help section on "Map Calculator" to see what the
map calculation does. The Map Calculator is probably the most important
Grid function that Arcview offers. It is likely that 90% of Grid analyses
can be done in the Map Calculator (there should be a program such as the
Map Calculator in any robust raster GIS - e.g., GRASS has r.mapcalc).
Question
3.3.1.a
Question
3.3.1.b
3.3.2 Proximity analysis
Michael is out of the sandtrap, but the governor is having a horrible
slicing problem involving a nearby lake. Nevertheless, having the
world's highest paid geographer with you helps!
After accounting for mail order purchases, you realize you can also
estimate which cities computer users will shop at. You go back to your
laptop. Since your goal is to determine whether a computer user purchases
their supplies in Illinois, when you do a proximity analysis, you request
the computer use the state name field of Cities.shp for the output map
from Analysis/Assign Proximity. This way, your output
map will contain areas named after the states the cities are from, completing
your analysis.
Question
3.3.2.a
Last updated 6 February 1999
Originally developed by Chuck Ehlschlaeger,, CUNY-Hunter College
http://dusk.geo.orst.edu/gis/demlab/
Return to GEO 465/565 Labs