Spatial
Spatial
Learning Objectives
Continuous surfaces or spatial fields
representation of geographical
information
Grid data structure for representing
numerical and categorical data
Map algebra raster calculations
Interpolation
Calculate slope on a raster using
ArcGIS method based in finite
differences
D8 steepest single flow direction
D steepest outward slope on grid
centered triangular facets
Readings – at http://help.arcgis.com
• Elements of geographic information starting from “Overview of
geographic information elements”
http://help.arcgis.com/en/arcgisdesktop/10.0/help/00v2/00v200000003
000000.htm
to “Example: Representing surfaces”
Readings – at http://help.arcgis.com
• Rasters and images starting from “What is raster data”
http://help.arcgis.com/en/arcgisdesktop/10.0/help/009t/009t000000020
00000.htm
to end of “Raster dataset attribute tables”
Two fundamental ways of representing
geography are discrete objects and fields.
The discrete object view represents the real world as
objects with well defined boundaries in empty space.
(x1,y1)
Points Lines Polygons
Continuous surface
Raster and Vector Data
Raster data are described by a cell grid, one value per cell
Vector Raster
Point
Line
Zone of cells
Polygon
Raster and Vector are two methods
of representing geographic data in
GIS
• Both represent different ways to encode and
generalize geographic phenomena
• Both can be used to code both fields and
discrete objects
• In practice a strong association between
raster and fields and vector and discrete
objects
Numerical representation of a spatial surface (field)
Grid
Regularly spaced sample points Irregularly spaced sample points Rectangular Cells
from Longley, P. A., M. F. Goodchild, D. J. Maguire and D. W. Rind, (2001), Geographic Information
Systems and Science, Wiley, 454 p.
A grid defines geographic space as a mesh of
identically-sized square cells. Each cell holds a
numeric value that measures a geographic attribute
(like elevation) for that unit of space.
The grid data structure
Number
of
rows
NODATA cell
(X,Y)
Number of Columns
Points as Cells
Line as a Sequence of Cells
Polygon as a Zone of Cells
NODATA Cells
Cell Networks
Grid Zones
Floating Point Grids
From http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Cell_size_of_raster_data/009t00000004000000/
Raster Generalization
P
P qo
qr
qs
Runoff generation at a point depends on
• Rainfall intensity or amount
• Antecedent conditions
• Soils and vegetation
• Depth to water table (topography)
• Time scale of interest
Accumulation of runoff
within watersheds
Raster calculation – some subtleties
Resampling or
interpolation (and
+ reprojection) of inputs to
target extent, cell size, and
projection within region
defined by analysis mask
=
Analysis mask
100 m 150 m
150 m
40 50 55
4 6
100 m
40 50 55
150 m
4 6
42 47 43
42 47 43
42 44 41 2 4
2 4
42 44 41
• Outputs are
on 150 m grid.
38 52
• How were
values
obtained ?
41 39
Nearest Neighbor Resampling with
Cellsize Maximum of Inputs
100 m
40 50 55
40-0.5*4 = 38
42 47 43
55-0.5*6 = 52
38 52
42 44 41
42-0.5*2 = 41
41-0.5*4 = 39 41 39
150 m
4 6
2 4
Scale issues in interpretation of
measurements and modeling results
The scale triplet
a) Extent b) Spacing c) Support
From: Blöschl, G., (1996), Scale and Scaling in Hydrology, Habilitationsschrift, Weiner Mitteilungen Wasser Abwasser Gewasser, Wien, 346 p.
From: Blöschl, G., (1996), Scale and Scaling in Hydrology, Habilitationsschrift, Weiner Mitteilungen Wasser Abwasser Gewasser, Wien, 346 p.
Use Environment Settings to control the scale
of the output
Extent
4 4 6 6 6
2 4 4
2 4
2 4 4
• Outputs are on
100 m grid as
38 47 52 desired.
• How were
41 45 41 these values
obtained ?
41 42 39
100 m cell size raster calculation
40-0.5*4 = 38
100 m
40 50 55 50-0.5*6 = 47
55-0.5*6 = 52
42 47 43
42-0.5*2 = 41
38 47 52
47-0.5*4 = 45
42 44 41 43-0.5*4 = 41
41 45 41
42-0.5*2 = 41
150 m
4 6 6 44-0.5*4 = 42
41 42 39
4 6 41-0.5*4 = 39
2 4 4
2 4 Nearest neighbor values resampled to
2 4 4 100 m grid used in raster calculation
What did we learn?
• Raster calculator automatically uses
nearest neighbor resampling
• The scale (extent and cell size) can be set
under options
dz (a 2d g) - (c 2f i)
dx 8 * x_mesh_spa cing
a b c
d e f dz (g 2h i) - (a 2b c)
dy 8 * y_mesh_spacing
g h i
2 2
rise dz dz rise
deg atan
run dx dy run
ArcGIS Aspect – the steepest downslope
direction
dz
dz / dx
dy atan
dz / dy
dz
dx
30 Example
a b c dz (a 2d g) - (c 2f i)
80 74 63 dx 8 * x_mesh_spacing
(80 2 * 69 60) (63 2 * 56 48)
d e f 145.2o
69 67 56 8 * 30
0.229
g h i
60 52 48 dz (g 2h i) - (a 2b c)
dy 8 * y_mesh_spacing
(60 2 * 52 48) (80 2 * 74 63)
Slope 0.229 2 0.329 2 8 * 30
0.401 0.329
0.229 180o
Aspect atan 34.8
o
0.329 145.2o
Hydrologic Slope (Flow Direction Tool)
- Direction of Steepest Descent
30 30
80 74 63 80 74 63
69 67 56 69 67 56
60 52 48 60 52 48
67 48 67 52
Slope: 0.45 0.50
30 2 30
Eight Direction Pour Point Model
32 64 128
16 1
8 4 2
?
The D Algorithm
Proportion Steepest direction
flowing to downslope
neighboring Proportion flowing to
grid cell 4 is neighboring grid cell 3
1/(1+2) is 2/(1+2)
3 2
4 2 1
Flow
direction.
5 1
6 8
7
Tarboton, D. G., (1997), "A New Method for the Determination of Flow Directions and
Contributing Areas in Grid Digital Elevation Models," Water Resources Research, 33(2): 309-
319.) (http://www.engineering.usu.edu/cee/faculty/dtarb/dinf.pdf)
The D Algorithm
Steepest direction
downslope
3 2
4
2
e1 e2
0 1 1 atan
5 1 e0 e1
2 2
8 e1 e2 e0 e1
6
7 S
If 1 does not fit within the triangle the angle is chosen along the
steepest edge or diagonal resulting in a slope and direction equivalent to
D8
D∞ Example
30
80 74 63 e 7 e8
1 atan
e0 e7
eo
69 67 56 52 48
atan 14 .9 o
67 52
e7 e8
60 52 48
2 2
284.9o 52 48 67 52
S
14.9o 30 30
0.517
Summary Concepts
• Grid (raster) data structures represent
surfaces as an array of grid cells
• Raster calculation involves algebraic like
operations on grids
• Interpolation and Generalization is an
inherent part of the raster data
representation
Summary Concepts (2)
• The elevation surface represented by a grid digital
elevation model is used to derive surfaces
representing other hydrologic variables of interest
such as
– Slope
– Drainage area (more details in later classes)
– Watersheds and channel networks (more details
in later classes)
Summary Concepts (3)
• The eight direction pour point model
approximates the surface flow using eight
discrete grid directions.
• The D vector surface flow model
approximates the surface flow as a flow
vector from each grid cell apportioned
between down slope grid cells.