Introduction To Spatial Analyst & Raster Display: Starting Arcgis and Exploring Help System
Introduction To Spatial Analyst & Raster Display: Starting Arcgis and Exploring Help System
Introduction To Spatial Analyst & Raster Display: Starting Arcgis and Exploring Help System
The locations of datasets we’ll be using are found in the data folder on the Ptolemy
server. To copy them all, copy raster from \\ptolemy\data\courses\g621\ (enter this on
Start>Run to pull up a window, or use the Ptolemy data shortcut on the desktop to look in
courses\g621) to your work folder – you should have been introduced to this in class, but
this most likely is a mapped work folder on the network or a local workspace on the
computer you’re using (probably D:\Workspace). Remember that local hard-drive data
should be backed up to your network folder before you leave on a given day.
1-1
The ArcGIS Spatial Analyst help system
There’s a lot of information there, but it takes a bit of time to get used to using it.
ArcGIS and extensions use the standard Windows help, so if you’ve used that, you’ll
hopefully find it familiar.
¾ Start by making the menu choice
Help>ArcGIS Desktop Help…
Start with the Contents tab, and scroll down through the topics. One of these topics will
be Extensions, and within that you’ll find the extension Spatial Analyst.
¾ At this time, spend some time exploring the Spatial Analyst section of the help
system, in order to get an understanding of the scope of the system.
¾ For now, read through the various sections of “Understanding Raster Data”.
Understand concepts such as cells, rows/columns, attributes, discrete/continuous data,
and:
Eventually we’ll be getting to Map Algebra, and you’ll find much more on that here.
The Spatial Analyst section provides access to the most comprehensive information
about individual commands, functions, operators, and methods available in Spatial
Analyst. When we learn about individual functions or tools, like slope, focalflow,
and others, you will also find the help system useful for looking up syntax for that
tool.
1-2
Adding a Raster Layer to a Map
¾ We’ll start by exploring our data. Click the Add Data button to bring up the Add
Data catalog browser. Navigate to the folder where the exercise data resides and
open the landuse raster.
¾ If you’re familiar with ArcMap, it should all look familiar, except for an added menu
toolbar (Spatial Analyst). You may need to add the toolbar, from the View menu.
¾ Turn the land-use layer on by clicking its button in the legend area [this should be
checked automatically when you add the data to the dataframe]. Note that the raster
is symbolized much like a feature layer in ArcMap, with different colors for each
category of land use/land cover, though the Anderson numeric land-use/land-cover
codes (11, 12, etc.) may not mean much to you. To find some meaningful
descriptions we could look in the attribute table.
¾ Bring up the attribute table for the landuse raster [Right-click on the layer and select
Open Attribute Table]. Landuse codes are categorical, and use integer numbers for
storage, in contrast to continuous variables like temperature which are stored as
floating-point. Integer rasters have VATs (Value Attribute Tables) which are very
similar to Feature Attribute Tables of feature layers. There are two standard fields,
Value (the main integer code used with the raster,
used for map algebra -- more on this later) and
Count (the number of cells having that value.
1-3
and more than one polygon can have the same value (for instance, more than one
part of a city might be residential land use). While you can have patches of
contiguous cells of the same value, those patches are not features, they are just
cells with the same value. Later on, we'll look at using patches as zones and
regions.
1-4
Displaying cell attributes and data selection
Displaying data from raster cells has some interesting
differences from the vector equivalent; though so far, with
the exception of a bit of difference with the attribute table,
using a grid (raster) layer seems little different from using a
feature (vector) layer. Let's see how they're different by
zooming in.
¾ Use the zoom-in tool to zoom into a location on the
view. Drag a rectangle with this tool to quickly zoom
into (approximately) the area shown here:
1-5
click on the landuse raster and select Zoom to Layer], then open the attribute table
[Remember: Right-click on the layer and select Open Attribute Table ]. Select a
record corresponding to "Evergreen Forest". With the dataframe visible, note that the
corresponding cells are turned cyan.
? How does this differ from selecting features from a feature attribute table?
[If you're not sure, try the same operation(s) with a feature layer -- there's a land-use
shapefile in the dataset, named lu.shp. Note the correspondence between table
records and land-use polygons, and how more than one polygon can have the same
value. Then look at the raster layer table. What's different?]
¾ For another view of the landuse raster layer, make this layer the target layer in the
Spatial Analyst Toolbar and click the histogram button .
1-6
¾ We can get selective with
the histogram by displaying
it only for a set of raster
cells. One way to do this is
to select an area on the map
with a graphic. There are
many types of graphics in
ArcView; we'll use a
rectangle. When you create
another histogram, only the
cells within the graphic are
considered. Note: you must
be in data view, not in
layout view.
1-7
? Before we start, why do
you think there is no VAT
with floating-point rasters?
¾ Change the symbology from a Stretched color ramp to a Classified color ramp by
bringing up the legend editor (double-click the elev layer in the legend).
1-8
? What does this tell you about the difference between integer and floating-point ?
We’ll come back to these concepts later, but let’s first see how
they might display, which is our current focus. For each of the
four results, investigate what you have using the view display (turn it on), the identify
tool, the histogram button, and the layers properties menu (Right-Click the Layer and
select Properties…).
¾ Create a slope raster from elev. The result will be slope angle in degrees (for the
result in percent, we’ll talk about methods later on). Investigate the resulting slope
raster.
How do you tell what type of raster is
? What kind of raster (integer or float) is the created?
For any raster layer in ArcMap, either
resulting slope raster?
from a layer you’ve added or derived,
right-click the layer in the table of
contents, go to Properties, and look in
the Source tab at Raster Information
to see a variety of properties about the
source dataset for the layer – the cell
? Why would this be the result? size, columns and rows, etc. The Pixel
Type tells you whether it’s floating
point or integer.
¾ Create an aspect (direction of slope) raster from elev, and investigate it.
1-9
? What kind of raster is the result, and why?
¾ Create a hillshade raster. Use the default parameters, and investigate it.
¾ Create a contour map from elev, using the default parameters, and investigate it.
? What kind of dataset do you get as the result from this analysis?
1-10
Displaying images and image-derived rasters
Image data collected from satellite sensors like LANDSAT and SPOT, or scanned from
aerial photography, can be displayed like a raster along with features. The benefits are
significant in terms of visualization and feature interpretation. This exercise will explore
the use of images for simple visual interpretation, and you'll use it to update land use
information from the area around Half Moon Bay.
Since both images and rasters are raster structures, you might expect that similar methods
can be used for displaying them. In fact, both rasters and images are symbolized as raster
datasets, though images cannot be manipulated or displayed as raster layers without
conversion. When you preview a single-band raster dataset, the value of each cell is
drawn as a color or a shade of gray depending on the data. When you preview a multi-
band raster dataset, i.e. Landsat Thematic Mapper image, three of its bands are combined
to form a composite image, where each band supplies either the red, green, or blue
display value.
From the Raster tab in the Options dialog box, you can choose which band will provide
which value. You can specify a different set of defaults, mapping bands to RGB display
values for datasets with three bands and those with four or more bands.
¾ Create a new dataframe, then add a 3-band false-color Landsat Thematic Mapper
image layer tmcomp.bil from hmbarea, using the Add Layer button .
¾ Explore this image layer with the various tools and buttons.
¾ Add some feature layers, like roads and streams, on this, and inspect the view to see
how well the image is registered.
Images can also be converted into rasters, allowing you to process them with the many
Grid commands.
¾ Create three rasters from the red, green and
blue bands of tmcomp.bil. You will need to
use ArcCatalog to convert the images to a
raster.
¾ Right click on the raster layer (tmcomp.bil)
in ArcCatalog and select Export > Raster to
Different Format.
¾ In the Output Raster Dataset box, set a name
for the grid you’re going to create, with no
extension (e.g. “outgrid”, not “outgrid.img”)
– extensions are used for tiffs “.tiff” and
ERDAS .imgs (“.img”). Since it’s actually
going to create a different grid for each
band, what will happen is a bit will be added
1-11
to each name: outgrid would be outgridc1, outgridc2 and outgridc3.
¾ Add the new rasters to ArcMap. To display these rasters like images, you will find
that a gray scale would be best [By default, ArcMap will display them in a grayscale
with a Stretched Classification].
Add a map to your report, and finish your report. Save it in your Reports folder, then
create a pdf using the same naming convention, e.g. “Smith_ras1.pdf”.
This concludes exercise 1. To save all this stuff you’ve done so you can look at it again,
we’ll save the map document. But first, you might want to change paths as relative: go
to File/Map Properties and click the Data Source Options button to select this option.
This may help you work in more than one place. Save the map document in the raster
folder as ras1.mxd [File>Save As….]. Also if you’re leaving for the day, and you’ve
been using the local workspace on the hard drive, remember to back up your work to
your network folder.
1-12