Anda di halaman 1dari 12

Fall 2007

Geog 473: GIS and Spatial Analysis

Point Data Analysis:


Geometric Measures

Naijun Zhou
Department of Geography
University of Maryland
September 19, 2007

Lecture outline

1. Properties of spatial distributions


2. Distance between a pair of points
3. Central tendency of point distributions
4. Spatial dispersion of point distributions
5. Direction of point distributions
6. Raster data

1. Properties of spatial distributions

1.1 Geometric properties


• For a single geospatial object: area, shape
• For a set of geospatial objects: center, distance,
direction, landscape indicators.

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -1-
1.2 First-order spatial variation
• Observations vary from place to place due to changes in
the underlying properties of the local “environment”.
• Example: more crimes may occur in places of higher
population density.

1.3 Second-order spatial variation


• The existence of an observation is due to interactions
with other observations.
• Example: crimes tend to be clustered.

2. Distance between a pair of points

2.1 Euclidean distance


The Euclidean distance between two points at locations
(x1, y1) and (x2, y2) in Euclidean Cartesian space:
Y
(x2, y2)

(x1, y1)
X

de = ( x1 − x2 ) 2 + ( y1 − y2 ) 2

2.2 Manhattan distance


The Manhattan distance is the shortest walking/driving
distance in a city laid out in square blocks, like Manhattan.
(x2, y2)

(x1, y1)

dm =| x1 − x2 | + | y1 − y2 |

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -2-
2.3 Distance along a path
(x2, y2)
Y
(xb, yb)

(xa, ya)
(x1, y1)
X
n
dp = ∑ d i di is the Euclidean distance of segment i.
i =1

3. Central tendency of point distributions

Let (xi, yi), i=1, 2, …, N, be the coordinates of N points


in the study area.

3.1 Mean center

• The average x-coordinate and average y-coordinate for


all points in the study area.
• The mean center of the points is ( X , Y )
N N
xi y
X =∑ ,Y = ∑ i
i =1 N i =1 N
• Mean center can be used to
9indicate the average location
9track changes of a point distribution
9compare point distributions

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -3-
3.2 Median center (center of minimum distance)

• The median center (Xe, Ye) is a location that has the


shortest total distance to all points.
• The median center is usually a new location instead of
one of the N points.
• X e , Ye minimizes


N
i =1
( xi − X e ) 2 + ( yi − Ye ) 2
• Median center can be used to
9find the most accessible location: e.g., find a new
factory location that minimizes the sum of transport
costs (e.g., for raw materials or markets).
9track changes of a point distribution
9compare point distributions

3.3 Central feature

• A central feature (Xc, Yc) is the point at which the total


distance to all other points is the shortest.
• (Xc, Yc) is one of the N points that has the minimum value of
N

∑ i =1
( xi − X C ) 2 + ( yi − YC ) 2

• Central feature can be used to


9find the most accessible location: find a location that
minimizes the sum of transport costs.
9track changes of a point distribution
9compare point distributions

3.4 Harmonic mean

• One or more outliers can skew the calculation of centers.

• The harmonic mean has coordinate ( X h , Yh ):


N N
Xh = N ,Y = N
1 h 1

i =1 xi
∑i =1 yi

• Harmonic mean discounts extreme coordinate values.

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -4-
3.5 Using weights in computing centers
• A weight indicates how important a geospatial object is.
• The centers are biased toward locations with high
weights.

City X coordinate (m) Y coordinate (km) Population (×10,000)


A 1 1 10
B 3 3 20
C 4 2 5

• Weighted mean center

If the weight of a point (xi, yi) is wi, the weighted


mean center is:

∑ ∑
N N
wi xi wi yi
Xw = i =1
Yw = i =1

∑ ∑
N N
i =1
wi i =1
wi

• Weighted median center


If the weight of a point (xi, yi) is wi, the weighted
median center is (Xwe, Ywe) that minimizes:


N
i =1
wi ( xi − X we ) 2 + ( yi − Ywe ) 2

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -5-
4. Spatial dispersion of point distributions

Spatial dispersion describes how a set of points scatter


around a center.

4.1 Standard deviation of the x and y coordinates


Standard deviation measures the spatial variations in x
and y coordinates.
N
( xi − X ) 2
Sx = ∑
i =1 N −1
N
( yi − Y ) 2
Sy = ∑
i =1 N −1
X , Y is the mean center of the points

4.2 Standard distance deviation


• Standard distance (deviation) indicates the average
distance to the mean center.

∑ ( xi − X ) 2 + ∑i =1 ( yi − Y ) 2
N N

SD = i =1
N −2

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -6-
SD
2*SD 3*SD
Mean center

• One SD covers more than 60% of the points.


• Two SD covers more than 95% of the points.
• Three SD covers more than 99% of the points.

5. Direction of point distributions

• Standard deviational ellipse


9 Spatial distributions may be
directional.
9 3 components describing a
standard deviational ellipse:
1) the angle of clockwise North
rotation (θ) from north
Y
2) the standard deviation along θ
x axis (Sx)
3) the standard deviation along Sy Sx
y axis (Sy) X

• Calculating the standard deviational ellipse

1) calculate the coordinates of the mean center, ( X , Y ),


which is the center of the ellipse.
2) For each point, (xi ,yi), transform its coordinate by:
xi' = xi − X
yi' = yi − Y
After this transformation, all points center at the
ellipse center.

3) Calculate the angle of rotation, θ.

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -7-
N N N N N

∑x '2
− ∑ yi' + (∑ xi' − ∑ yi' ) 2 + 4(∑ xi yi ) 2
2 2 2 ' '
i
tan θ = i =1 i =1 i =1
N
i =1 i =1

2∑ xi' yi'
i =1

Y x (x,y) x
tan θ =
y y
θ
X

θ takes a value between [-90, 90]


If θ is positive, clockwise rotate θ from north
If θ is negative, clockwise rotation (360+θ) from north

4) Calculate the standard deviations along x-axis and y-axis

∑ ( x cosθ − y sin θ )
'
i
'
i
2

Sx = 2× i =1
N −2

∑ ( x sin θ − y cosθ )
'
i
'
i
2

Sy = 2× i =1
N −2

5) Describing the flatness of the ellipse: Eccentricity

The longer axis (deviation) is called major axis (a),


the shorter axis (deviation) is called minor axis (b),
the eccentricity e is:

a 2 − b2
e=
a
As e approaches 0, the ellipse becomes a circle.
As e approaches 1, the ellipse flattens to a line.

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -8-
• Exercise: calculate the standard deviational ellipse of
three locations (1,1), (3,3), (4,2)

3 3, 3
Y

2 4, 2

1 1, 1

0
0 1 2 3 4 5
X

Step 1: calculate the mean center:


N =3
1+ 3 + 4 8
X= = = 2.67
3 3
1+ 3 + 2 6
Y= = =2
3 3
4

3 3, 3

2 2.67, 2 4, 2

1 1, 1

0
0 1 2 3 4 5

Step 2: transform the location coordinates

x1' = x1 − X = 1 − 2.67 = −1.67


y1' = y1 − Y = 1 − 2 = −1

x2' = x2 − X = 3 − 2.67 = 0.33


y2' = y2 − Y = 3 − 2 = 1

x3' = x31 − X = 4 − 2.67 = 1.33


y4' = y4 − Y = 2 − 2 = 0

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -9-
Step 3: calculate the angle θ
N N N N N

∑x '2
− ∑ yi' + (∑ xi' − ∑ yi' ) 2 + 4(∑ xi yi ) 2
2 2 2 ' '
i

tan θ = i =1 i =1 i =1
N
i =1 i =1

2∑ xi' yi'
i =1
N N

∑x −∑ y
i =1
'2
i
i =1
'2
i = [(−1.67) 2 + 0.332 + 1.332 ] − [(−1) 2 + 12 + 0 2 ] = 2.67
N

∑ xi' yi' = (−1.67) * (−1) + 0.33 *1 + 1.33 * 0 = 2


i =1

2.67 + 2.67 2 + 4 * 2 2
tan θ = = 1.87
2*2
θ=1.08 (radian), θ=1.08*180/π=61.9º
cosθ = 0.47, sinθ = 0.88

3 3, 3 Y
θ =61.9º
2 2.67, 2 4, 2

1 1, 1

X
0
0 1 2 3 4 5

Step 4: calculate Sx and Sy


N N

∑ ( x cos θ − y sin θ )
'
i
'
i
2
∑ ( x sin θ − y cos θ )
'
i
'
i
2

Sx = 2 × i =1
Sy = 2× i =1

N −2 N −2

[(−1.67) *0.47− (−1) *0.88)]2 +[0.33*0.47−1*0.88]2 +[1.33*0.47− 0*0.88]2


Sx = 2×
3− 2
0.0091+ 0.5255+ 0.3908
= 2* =1.36
1

[(−1.67)*0.88− (−1) *0.47)]2 +[0.33*0.88−1*0.47]2 +[1.33*0.88− 0*0.47]2


Sy = 2×
3− 2
0.9992+ 0.0323+1.3698
= 2* = 2.19
1

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -10-
4

Y
9
3 3, 3 2.1
θ =61.9º
2 2.67, 2 4, 2

1.3
6
1 1, 1

X
0
0 1 2 3 4 5

Step 5: calculate eccentricity e

Because Sx = 1.36 and Sy = 2.19, we have


a=2.19, b=1.36, then,

a2 − b2 2.19 2 − 1.36 2
e= = = 0.78
a 2.19

The ellipse tends to be flat.

6. Raster data
• Geospatial objects can be represented as raster or
vector data.

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -11-
• Raster as a data model:
9 Reality: a continuous field
9 Conceptual model: values at anywhere in the field
9 Logical model: an array of pixels covering the field
and each pixel has a value
9 Physical model:
‰ A 2-dimensional array of pixels (row, column)
‰ A file header describing the number of rows and
columns, size of each pixel, and coordinate of
corner of the array, etc.

• Raster data stored in a text file (ArcGIS ASCII file)

• Raster data can represent continuous subjects, e.g.,


distance to public schools.

Legend (meter)

Geog473, Fall 2007


Naijun Zhou, Department of Geography, UMD -12-