S H A W N L . P E N M A N
E A R T H D A T A A N A LY S I S
C E N T E R
U N I V E R S I T Y O F N E W M E X I C O
RASTER ANALYSIS
Spatial Analyst basics
Raster / Vector conversion
Raster data fundamentals
Cells, cell values, zones and regions
Basic spatial properties of raster
Points, lines, polygons, distance, adjacency, buffer, network
Types of raster functions
Raster reclassification
Raster overlay
Raster query and map algebra
Distance functions
Zonal statistics
Other raster analysis tools
TOPICS COVERED
SPATIAL ANALYST
BASICS
SPATIAL ANALYST TO WORK WITH RASTER DATA
Extremely useful extension to ArcGIS
Same for all levels (ArcView, ArcInfo)
Needs to be purchased separately.
Spatial Analyst uses grids
essentially makes ArcGIS into a raster program
Spatial analysis and modeling tools
queries, overlay, distance, proximity, density, slope, aspect, hillshade,
viewshed, contours, etc.
ARCGIS SPATIAL ANALYST
TURNING SPATIAL ANALYST ON
SPATIAL ANALYST TOOLBAR &
ARCTOOLBOX
ArcMap 9.3
Spatial Analyst Toolbar
ArcMap 10.1
Spatial Analyst & Image
Classification Toolbars
Tools now in
ArcToolbox
ADRG (ARC Digitized Raster Graphics)
CADRG (Compressed ADRG)
CIB (Controlled Image Base)
DTED (Digital Terrain Elevation Data)
ERDAS GIS, LAN, RAW, IMG
ERMapper (ERS)
BIL, BIP, BSQ
ESRI GRID
GIF, JPG, SID, TIF, BMP
RASTER FORMATS
GRIDS
Grids are the main raster format
of ArcGIS Spatial Analyst. Output
created by Spatial Analyst consist
of grids – these can be converted
to other formats using ArcCatalog.
WORKING WITH GRIDS
Grids are stored very
much like coverages ….
Always set a proper
working directory and
never delete files
manually in Windows
Explorer but use
ArcCatalog.
BUILDING PYRAMIDS
Pyramids are used to improve performance. They are a downsampled version of the
original raster dataset and can contain many downsampled layers. Each successive
layer of the pyramid is downsampled at a scale of 2:1. Pyramids can speed up the
display of raster data by retrieving only the data at a specified resolution that is
required for the display.
SINGLE-BAND RASTERS
MULTIBAND RASTERS
Grid data files can be classified using the Symboloy properties
Grid cells are given a solid color based on cell values
Both discrete and continuous data are used
discrete data are stored an integer grid theme, e.g. land use, soil type,
land ownership, etc.
continuous data are stored as an integer or floating point grid theme,
e.g. population density, elevation, price of land etc.
Various classification methods can be used
Unique values
Classified
Stretched
DISPLAYING GRIDS
Housing units in city of Pittsburgh
GRID MAP EXAMPLE
GIS TUTORIAL 1 - Basic Workbook
Census block centroids Kernel density raster map
UNIQUE VALUES
CLASSIFIED
STRETCHED
ANALYSIS OPTIONS
Now settings under
Environments
ENVIRONMENTS
ANALYSIS MASK
The mask identifies those cells within the analysis extent that will
not be considered when performing an operation or a function.
All identified cells will be "out" and assigned to the nodata value
on all subsequent output raster datasets.
ANALYSIS MASK
The analysis extent be a vector or raster file – in the example, a vector
polygon is used as a mask to create slope map from a DEM but only
within the study area.
ANALYSIS EXTENT
When performing analysis, the area of interest may be a portion of a larger raster dataset. If the
area of interest is a portion of a larger raster dataset, the analysis extent can be set to encompass
only the desired cells. All subsequent results from analysis will be to this extent. The analysis extent
is a rectangle and is specified by identifying the coordinates of the window in map space.
RASTER RESOLUTION
CELL SIZE
The output cell size, or resolution, for any operation or function can be set to any size desired.
The default output resolution is determined by the coarsest of the input raster datasets.
RASTER / VECTOR
CONVERSION
RASTER / VECTOR CONVERSION
RASTER / VECTOR CONVERSION
RASTER / VECTOR CONVERSION
RASTER DATA
FUNDAMENTALS
CELLS, ROWS, COLUMNS AND VALUES
Raster data sets are an
organized matrix of cells.
Cells are organized into
rows & columns which
have an index position
number. The top left cell is
at the (0,0) position. The
notation uses column first,
followed by row.
7
0 1 2 3 4 5
0
1
2
3
4
5
Rows
Columns
(4,1)
RASTER DATA AND COORDINATE
SYSTEMS
Raster data layers are
stored with a Cartesian
coordinate system.
Positions on the grid
have real-world
locations.
Each cell can be
referenced by an X,Y
location.
All cells are square & are
the same size.
Raster origin
(135,982;1,251,821)
Coordinate origin (0,0) X axis
Y a
xis
25
25
CELL VALUES
2 2 3 3 3
1 3 3 2 3
2 2 3 1 2
2 2 4 2 2
4 3 2 3 1
2 3 4 4 2
2
1
1
2
2
1
INTEGER VS. FLOATING POINT
2 2 3 3 3
1 3 3 2 3
2 2 3 1 2
2 2 4 2 2
4 3 2 3 1
2 3 4 4 2
2
1
1
2
2
1 5.2389 5.2389 5.2389 5.2389 5.2389 5.2389
5.2389 5.2389 5.2389 5.2389 5.2389 5.2389
5.2389 5.2389 5.2389 5.2389 5.2389 5.2389
5.2389 5.2389 5.2389 5.2389 5.2389 5.2389
5.2389 5.2389 5.2389 5.2389 5.2389 5.2389
5.2389 5.2389 5.2389 5.2389 5.2389 5.2389
DATA TYPES AND CELL VALUES
WORKING WITH NO DATA
ZONES
2 2 5 6 3
1 3 3 2 3
2 2 3 1 2
5 2 4 2 2
4 3 2 3 1
2 3 4 1 2
2
1
4
5
5
1
Any two or more cells within the same value belong to the same zone –
a zone can consist of cells that are connected, disconnected or both.
An example
with 6 zones.
ZONES AND ATTRIBUTE DATA
Value Count
1 6
2 13
3 8
4 4
5 4
6 1
2 2 5 6 3
1 3 3 2 3
2 2 3 1 2
5 2 4 2 2
4 3 2 3 1
2 3 4 1 2
2
1
4
5
5
1
BASIC SPATIAL
PROPERTIES OF RASTER
Points
Line
Polygons
Distance
Adjacency
Buffer
Network
Spatial Coincidence
BASIS SPATIAL PROPERTIES IN RASTER
RASTER - POINTS
RASTER - LINES
RASTER - POLYGONS
RASTER - DISTANCE
RASTER - ADJACENCY
Orthogonal
only
Orthogonal
and diagonal
RASTER - BUFFER
RASTER - NETWORK
12 14
15 24
23 27
21
18
17
RASTER – SPATIAL COINCIDENCE
TYPES OF RASTER
FUNCTIONS
RASTER FUNCTIONS
Local
Focal
Zonal
Global
LOCAL FUNCTION EXAMPLE: RASTER
CALCULATOR
2 2 5
1 3 3
2 2 3
5 2 4
2
1
4
5
* 2 =
4 4 10
2 6 6
4 4 6
10 4 8
4
2
8
10
GLOBAL FUNCTION EXAMPLE: STRAIGHT-
LINE DISTANCE
-
1 =
0
1 -
-
- -
-
-
-
-
-
-
- - - -
1
1
1.4
1.4
2
2
2.2
2.2
2.2
3
3.1
3.1
2.8 3.6
Distance of
RASTER
RECLASSIFICATION
RECLASSIFY
Reclassifying your data simply means replacing input cell values with new output cell values. The
input data can be any supported raster format. If you add a multiband raster, the first band will be
taken and used in the reclassification.
ELEVATION RASTER
RECLASSIFY
There are many reasons why you might want to reclassify your
data. Some of the most common reasons are:
To replace values based on new information
To classify certain values together for display
To classify certain values together for conversion to vector format for
analysis
To reclassify values to a common scale
To set specific values to nodata or to set nodata cells to a value
RECLASSIFY
Reclassification is useful when you want to replace the values in
the input raster with new values. This could be due to finding
out that the value of a cell or a number of cells should actually
be a dif ferent value.
For example, this may happen if the landuse in an area changed over
time.
You may want to simplify the information in a raster.
For instance, you may want to group together various types of forest
into one forest class.
RECLASSIFY
Another reason to reclassify is to assign values of preference,
sensitivity, priority, or some similar criteria to a raster. This may
be done on a single raster (a raster of soil type may be assigned
values of 1–10 that represent erosion potential) or with several
rasters to create a common scale of values .
For example, when finding slopes most at risk of avalanche activity,
input rasters might be slope, soil type, and vegetation. Each of these
rasters might be reclassified on a scale of 1–10 depending on the
susceptibility of each attribute in each raster to avalanche activity (that
is, steep slopes in the slope raster might be given a value of 10
because they are most susceptible to avalanche activity).
RECLASSIFY
Sometimes you want to remove specific values from your
analysis.
This might be, for example, because a certain landuse type has
restrictions (such as wetland restrictions), which means you cannot
build there. In such cases, you might want to change these values to
nodata in order to remove them from further analysis .
In other cases, you may want to change a value of NoData to be
a value such as in the case where new information means a
value of NoData has become a known value.
RECLASSIFY
RECLASSIFY
RECLASSIFY
f tp://edacftp.unm.edu/outgoing/pub/spenman/geog581L/exam
ples_raster_analysis/part1
FTP SITE
Open Tutorial1-1 mxd
DEM Properties, Source tab – how many columns & rows and
what is their size?
What is the projection?
Statistics – what is the range of elevation?
Examine attribute table of LandUse
How many records are there?
Set Environment – turn on spatial analyst toolbar
Set Raster Analysis Environment Cell size, select “as specified as
below”, “50”, mask Pittsburgh
Extract Land Use using a mask
Use layer file to symbolize new land use layer
DEMO/PRACTICE
Reclassify Tool
Reclassify LandUse
All developed into one category
All forest into one category
All wetlands into one category
Have to look at classification (symbology tab) to figure out which
numbers belong to developed, forest and wetlands categories
Examine changes
Try reclassify with Classification window
Use reclassified LandUse and export to polygon
DEMO/PRACTICE