Вы находитесь на странице: 1из 42

Spatial Data

What is special about Spatial Data?

Briggs Henan University 2012


What is needed for spatial analysis?
1. Location informationa map
2. An attribute dataset: e.g
population, rainfall
3. Links between the locations
and the attributes
4. Spatial proximity information
Knowledge about relative
spatial location
Topological information
Topology --knowledge about relative spatial positioning
2
Topography --the form of the land surface, in particular, its elevation
Briggs Henan University 2012
Berrys geographic matrix
Berry, B.J.L 1964 Approaches to regional analysis: A synthesis . Annals of the Association of American Geographers, 54,
pp. 2-11 1990
Attributes or variables
time location
2000 Variable 1 Variable 2 Variable P
Attributes or variables
location
areal unitPopulation
1
2010 Income Variable P
areal unit 2Attributes or Variables
location
areal unitPopulation
.1
.
Income Variable P
areal unit .2 geographic
Henanareal
. unit n associations
.
Shanxi . geographic
areal
. unit ndistribution geographic
. fact
.
3
areal unit n Briggs Henan University 2012
4

Briggs Henan University 2012


Types of Spatial Data
Continuous (surface) data
Polygon (lattice) data
Point data
Network data

Briggs Henan University 2012


Spatial data type 1: Continuous
(Surface Data)
Spatially continuous data
attributes exist everywhere
There are an infinite number locations
But, attributes are usually only
measured at a few locations
There is a sample of point
measurements
e.g. precipitation, elevation
A surface is used to represent
continuous data

Briggs Henan University 2012


Spatial data type 2: Polygon Data
polygons completely covering
the area*
Attributes exist and are measured
at each location Legend

Area can be:


15.26 - 25.13
25.14 - 32.27
32.28 - 39.27
39.28 - 47.20
47.21 - 68.89

irregular (e.g. US state or China


province boundaries)
regular (e.g. remote sensing
images in raster format)

*Polygons completely covering an area are


called a lattice 7

Briggs Henan University 2012


Spatial data type 3: Point data
Point pattern
The locations are the focus
In many cases, there is no attribute involved

Briggs Henan University 2012


Spatial data type 4: Network data
Attributes may measure
the network itself (the roads)
Objects on the network (cars)
We often treat network objects as
point data, which can cause serious
errors
Crimes occur at addresses on
networks, but we often treat them as
points

See: Yamada and Thill Local Indicators of network-constrained clusters in


spatial point patterns. Geographical Analysis 39 (3) 2007 p. 268-292 9

Briggs Henan University 2012


Which will we study?

Point data
(point pattern analysis: clustering and dispersion)

Polygon data*
(polygon analysis: spatial autocorrelation and spatial regression)
Continuous data*
(Surface analysis: interpolation, trend surface analysis and kriging)

10
*in the fall semester
Briggs Henan University 2012
Converting from one type of data
to another.
--very common in spatial
analysis

11

Briggs Henan University 2012


Converting point to continuous data:
interpolation
## #
# #
# # #
#
# #
# #
#
# #
# #

# ## # #
#
#
# #

## # # # # #
#
# # ## #
#
#

# # #
#
#
# #
## # #
# # #
#
# ## #

##
#
# #
# # # #
## # #
#
# # # ## # #
#
#
#
## # #
## # # ## # # ## ##
# # # #
#
#

## # # # # ## #
#

# #
#
# # #

# # # #
# #
# # # # ##
#
# # # # #
#
# # # #
# # ##
#
##
#
#
## # ## ### ## # ## # #
##
###
###
#
#
##
#
##
# # # #

#
#
#
#
#
# #
# ## ## # # #
#
#
## # # #
# # #
# #

#
#
# # # #
#
# # #
# ## # #
#
# #
# #
#
#
# #
# #
#
#
# #
#
#
12
#
# #
#

Briggs Henan University 2012


Interpolation
Finding attribute values at locations where there
is no data, using locations with known data
values
Simple linear
Usually based on interpolation
Value at known location Known
Distance from known location
Methods used Unknown
Inverse distance weighting
Kriging

13

Briggs Henan University 2012


Converting point data to polygons
using Thiessen polygons
## #
# #
# # #
# #
# # #
# ## # #
# # # # # #
# # #
## # # # # #
#
# # ## # #
#
# #
# # # # # #
## #
#### # #
# # #
# # # # # ##
# # #
#
# # # # # #
# # # ### #
## #
#
# # # # ###
# # # # #
# # #
#
## # # #
# # #
# # # # #
# # #
# # # #
# # # # #
# # # #
#
# # # # #
# # # # #
#
# # # # # #
# # # # # # #
# # ## # ## #
# ### ## # ## # #
# ##
# # ###
# ## #
# # # #
#
# # # # # #
# # # #
# #
# #
# # # #
# #
#
# # # # #
#
# # #
# # # # # #
# #
# # # #
# #
# #
#
#
# #
#
#
#
14
#
# #

Briggs Henan University 2012


Thiessen or Proximity Polgons
(also called Dirichlet or Voronoi Polygons)
Polygons created from a point layer
Each point has a polygon (and each Thiessen or Proximity
Polygons
polygon has one point)
any location within the polygon is
closer to the enclosed point than to
any other point A
space is divided as evenly as
possible between the polygons

15

Briggs Henan University 2012


How to create Thiessen Polygons

1. Connect point 2. Draw 3. Repeat for 4. Thiessen


to its nearest perpendicular other points polygons
(closest) neighbor line at midpoint

16

Briggs Henan University 2012


Converting polygon to point data using
Centroids
Centroidthe balancing point for a polygon
used to apply point pattern analysis to polygon data
More about this later

17

Briggs Henan University 2012


Using a polygon to represent a set of
points: Convex Hull
the smallest convex polygon able to contain a set
of points
no concave angles pointing inward
A rubber band wrapped around a set of points No!
reverse of the centroid
Convex hull often used to create the boundary of
a study area
a buffer zone often added
Used in point pattern analysis to solve the boundary
problem.
Called a guard zone

18

Briggs Henan University 2012


Models for Spatial Data:
Raster and Vector
two alternative methods for
representing spatial data

19

Briggs Henan University 2012


Concept of Vector and Raster
river
Real World
house
trees

Raster Representation Vector Representation


0 1 2 3 4 5 6 7 8 9
0 R T
1 R T
point
2 H R
3 R line
4 R R
5 R
6 R T T H
7 R T T polygon
8 R
9 R
20

Briggs Henan University 2012


Comparing Raster and Vector Models
Raster Model
area is covered by grid with (usually) equal-size, square cells
attributes are recorded by giving each cell a single value based on the majority feature (attribute) in the cell, such as
land use type or soil type
Image data is a special case of raster data in which the attribute is a reflectance value from the geomagnetic spectrum
cells in image data often called pixels (picture elements)
Vector Model
The fundamental concept of vector GIS is that all geographic features in the real work can be represented either as:
points or dots (nodes): trees, poles, fire plugs, airports, cities
lines (arcs): streams, streets, sewers,
areas (polygons): land parcels, cities, counties, forest, rock type
Because representation depends on shape, ArcGIS refers to files containing vector data as shapefiles

21

Briggs Henan University 2012


Raster model
Land use (or soil type) Image
corn fruit

wheat
clover

fruit

0 1 2 3 4 5 6 7 8 9
Each cell (pixel)
0 1 1 1 1 1 4 4 5 5 5
1 1 1 1 1 4 4 5 5 5
has a value
1
2 1 1 1 1 1 4 4 5 5 5 between 0 and
1 1 1 1 1 4 4 5 5 5
3
4 1 1 1 1 1 4 4 5 5 5
255 (8 bits)
2 2 2 2 2 2 2 3 3 3
5
6 2 2 2 2 2 2 2 3 3 3 21
7 2 2 2 2 2 2 2 3 3 3
8 2 2 4 4 2 2 2 3 3 3 186
9 2 2 4 4 2 2 2 3 3 3

22

Briggs Henan University 2012


Vector Model
point (node): 0-dimensions
single x,y coordinate pair
zero area
tree, oil well, location for label 2
y=2
. Point: 7,2
line (arc): 1-dimension x=7
1
two connected x,y coordinates 1
road, stream 7 8
A network is simply 2 or more 2
connected lines
polygon : 2-dimensions 1 Line: 7,2 8,1
four or more ordered and connected x,y 7 8
coordinates
first and last x,y pairs are the same 2
encloses an area Polygon: 7,2 8,1 7,1 7,2
county, lake 1

7 8

23

Briggs Henan University 2012


Using raster and vector models to
represent surfaces

24

Briggs Henan University 2012


Representing Surfaces
with raster and vector models 3 ways
Contour lines
Lines of equal surface value
Good for maps but not computers!
Digital elevation model (raster)
raster cells record surface value
TIN (vector)
Triangulated Irregular Network (TIN)
triangle vertices (corners) record surface value

25

Briggs Henan University 2012


Contour (isolines) Lines
for surface representation
Contour lines of constant elevation
Advantages
--also called isolines (iso = equal)
Easy to understand (for most people!)

Circle = hill top (or basin)


Downhill > = ridge
Uphill < = valley
Closer lines = steeper slope

Disadvantages
Not good for computer representation
Lines difficult to store in computer
Raster
for surface representation

Each cell in the raster records the height (elevation) of the surface

5
10
0
11
5
11
0
12

Raster cells with


Surface Contour lines elevation value
Raster cells
(Contain
elevation
values)

27

Briggs Henan University 2012


Triangulated Irregular Network (TIN):
Vector surface representation
a set of non-overlapping triangles
valley
formed from irregularly spaced
points
ridge
preferably, points are located at
significant locations, 1 2
bottom of valleys, tops of ridges
4 3
Each corner of the triangle vertex 5
(vertex) has:
x, y horizontal coordinates
z vertical coordinate measuring
elevation.
Draft: How to Create a TIN
surface:
from points to surfaces

Thiessen3.jpg Thiessen4.jpg

Links together all spatial concepts: point, line, polygon, surface


29

Briggs Henan University 2012


Using raster and vector models to
represent polygons
(and points and lines)

30

Briggs Henan University 2012


Representing Polygons
(and points and lines)
with raster and vector models

X
0 1 2 3 4 5 6 7 8 9
0 1 1 1 1 1 4 4 5 5 5
1 1 1 1 1 1 4 4 5 5 5

Raster model not good 2


3
4
1
1
1
2
1
1
1
2
1
1
1
2
1
1
1
2
1
1
1
2
4
4
4
2
4
4
4
2
5
5
5
3
5
5
5
3
5
5
5
3
5
6 2 2 2 2 2 2 2 3 3 3
not accurate 7
8
9
2
2
2
2
2
2
2
4
4
2
4
4
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
3

Also a big challenge for the vector model


but much more accurate
the solution to this challenge resulted in the
modern GIS system

31

Briggs Henan University 2012


Using Raster model for points,
lines and polygons
For points
--not good!
For lines and polygons

Point lost if two Line not


points in one cell accurate

Polygon boundary
Point located at cell center not accurate
--even if its not 32

Briggs Henan University 2012


Using vector model to represent
points, lines and polygons:
Node/Arc/Polygon Topology
The relationships between all spatial elements (points, lines, and polygons) defined by four concepts:
Node-ARC relationship:
specifies which points (nodes) are connected to form arcs (lines)
Arc-Arc relationship
specifies which arcs are connected to form networks
Polygon-Arc relationship
defines polygons (areas) by specifying
which arcs form their boundary
From-To relationship on all arcs
Every arc has a direction from a node to a node
This allows from to
This establishes left side and right side of an arc (e.g. street)
Also polygon on the left and polygon on the right for from

every side of the polygon


Left to
New!

Right

33

Briggs Henan University 2012


1 II 2 Birch
Node/Arc/ Polygon and Attribute Data
Smith Example of computer implementation
I Estate A34 III A35

4 IV 3 Cherry
Attribute Data
Spatial Data Node Feature Attribute Table
Node Table Node ID Control Crosswalk ADA?
Node ID Easting Northing 1 light yes yes
1 126.5 578.1 2 stop no no
2 218.6 581.9 3 yield no no
3 224.2 470.4 4 none yes no
4 129.1 471.9
Arc Feature Attribute Table
Arc Table Arc ID Length Condition Lanes Name
Arc ID From N To N L Poly R Poly I 106 good 4
I 4 1 A34 II 92 poor 4 Birch
II 1 2 A34 III 111 fair 2
III 2 3 A35 A34 IV 95 fair 2 Cherry
IV 3 4 A34 Polygon Feature AttributeTable
Polygon Table Polygon ID Owner Address
Polygon ID Arc List A34 J. Smith 500 Birch
A34 I, II, III, IV A35 R. White 200 Main
A35 III, VI, VII, XI 34

Briggs Henan University 2012


This is how a vector GIS system works!

This data structure was invented by Scott Morehouse at the


Harvard Laboratory for Computer Graphics in the 1960s.

Another graduate student named Jack Dangermond hired


Scott Morehouse, moved to Redlands, CA, started a new
company called ESRI Inc., and created the first commercial
GIS system, ArcInfo, in 1971

Modern GIS was born!


35

Briggs Henan University 2012


Other ways to represent polygons
with vector model
2. Whole polygon structure
3. Points and Polygons structure

Used in earlier GIS systems before


node/arc/polygon system invented
Still used today for some, more simple, spatial
data (e.g. shapefiles)
Discuss these if we have time!
36

Briggs Henan University 2012


Vector Data Structures:
Whole Polygon
Whole Polygon (boundary structure): list coordinates of points in order as
you walk around the outside boundary of the polygon.
all data stored in one file
coordinates/borders for adjacent polygons stored twice;
may not be same, resulting in slivers (gaps), or overlap
all lines are double (except for those on the outside periphery)
no topological information about polygons
which are adjacent and have a common boundary?
used by the first computer mapping program, SYMAP, in late 1960s
used by SAS/GRAPH and many later business mapping programs
Still used by shapefiles.

Topology --knowledge about relative spatial positioning


-- knowledge about shared geometry 37

Topography --the form of the land surface,Briggs


in particular, its elevation
Henan University 2012
Whole Polygon: Data File
A34 C30
illustration A44 C32
A42 D42
5 A32 D52
A34 D50
4 B44 D40
B54 D42
3
A B B52 E15
E B42
2 E55
B44 E54
1 C D C 32 E34
0 C42 E30
C40 E10
1 2 3 4 5
E15
38

Briggs Henan University 2012


Vector Data Structures:
Points & Polygons
Points and Polygons: list ID numbers of points in order
as you walk around the outside boundary
a second file lists all points and their coordinates.
solves the duplicate coordinate/double border problem
still no topological information
Do not know which polygons have a common border
first used by CALFORM, the second generation mapping
package, from the Laboratory for Computer Graphics and
Spatial Analysis at Harvard in early 70s

39

Briggs Henan University 2012


Points and Polygons: Points File
Illustration 1
2
34
44
3 42 Polygons File
5 12 4 32 A 1, 2, 3, 4, 1
11 5 54 B 2, 5, 6, 3, 2
2
4 1 5 6 52 C 4, 3, 8, 9, 4
7 50 D 3, 6, 7, 8, 3
3
E A B 8 40 E 11, 12, 5, 1, 9,
3 9 30 10, 11
2 4 6
10 10
1 C D 11 15
10 9 8
0 7 12 55

1 2 3 4 5
40

Briggs Henan University 2012


Hopefully, you now have a better
understanding of
what is special about spatial data!
Monday, we will begin talking about
Spatial Statistics

41

Briggs Henan University 2012


42

Briggs Henan University 2012

Вам также может понравиться