Statistical Work Experiences in a Major Pharmaceutical Company Qiming Liao, Ph.D Hui Zhi, Ph.D
Copyright, 1998-2012 © Qiming Zhou GEOG3600. Geographical Information Systems Spatial Analysis.
-
Upload
brenda-maston -
Category
Documents
-
view
219 -
download
2
Transcript of Copyright, 1998-2012 © Qiming Zhou GEOG3600. Geographical Information Systems Spatial Analysis.
Copyright, 1998-2012 © Qiming Zhou
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
TPU-based Population Density0 - 1200012000 - 3520035200 - 5920059200 - 102400102400 - 193700
Distance Zones to Hospital123
Population Density0 - 1270012700 - 3690036900 - 6870068700 - 110700110700 - 193700
# Surveyed Hospitals
6 0 6 12 18 24 Kilometers
#
###
#
#
#
#
#
#
#
##
# #
#
#
#
#
#
S
N
EW
Hong Kong Hospital Coverage
GEOG3600. Geographical Information Systems
Spatial Analysis
Spatial Analysis 2
Spatial Analysis
Analysis or modelling? Vector GIS analysis capabilities Raster GIS analysis capabilities Geographical analysis procedure
Spatial Analysis 3
Map analysis and modelling
“What distinguishes a GIS from other types of information systems are its spatial analysis functions. These functions use the spatial and non-spatial attribute data in the GIS database to answer questions about the real world”.
Aronoff, 1989, pp 189.
Spatial Analysis 4
Analysis or modelling?
The advantage a GIS can provide is the capability for transforming the original spatial data to answer user’s questions.
Such transformations are often referred to as “data analysis” capabilities in GIS.
However, most so-called “analysis” capabilities of today’s GIS are in fact data manipulation and maintenance functions, very rare of them are actually tell us something by “analysing” spatial data.
Spatial Analysis 5
Definitions What is “analysis”?
Analysis specifies data transformations which are analytical.
“Analysis” is the process to resolve and separate the reference system into its parts to illuminate their nature and interrelationships, and to determine general principles of behaviour.
What is “modelling”? Modelling specifies data transformations which
involve the synthesis of information. The “synthesis” is the process to put together
expressions of general principles with representations of parts of the reference system so as to form a replica that exhibits behaviour similar to that of the reference system.
Spatial Analysis 6
Analysis versus modelling
A theory is the product of analysis.
A model is the product of syntheses, using theory.
Spatial Analysis 7
Spatial analysis and GIS
Geographical analysis allows the study of real-world processes by developing and applying models.
A GIS enhances this process by providing tools which can be combined in a meaningful sequences to develop new models. These models may reveal new or previously unidentified relationships thus increasing our understanding of the real world.
Results of geographical data analysis can be communicated with maps, reports, or both.
Spatial Analysis 8
Geographical model
A GIS database is a model of the real world that can be used to mimic certain aspects of reality.
A model must represent certain entities and relationship among them.
A model may be represented in words, in mathematical equations, or as a set of spatial relations presented by maps or GIS.
Spatial Analysis 9
The nature of models
Models are designed to mimic only selected aspects of reality.
A more complex model may or may not provide “better” answer.
A model can be tested and manipulated more conveniently at a faster (or slower) rate and less expensively than the condition it mimics.
Spatial Analysis 10
The use of models
Models are used when it is more convenient or it is not possible to collect the information directly. e.g. It is convenient to measure road distance on a
map. e.g. The height a forest will reach in 100 years time is
impossible to measure directly. A model is used to understand what happened
in the past and to present scenario on what consequence might be with the present conditions.
Spatial Analysis 11
Organising geographical data for analysis Data layers
A data layer consists of a set of logically related geographical features and their attributes
Representations of a data layer Raster grid, overlay (grid cells) Vector coverage (point, line, polygon)
Spatial Analysis 12
GIS analysis functions
A GIS provides analysis and modelling capability by means of its analysis functions.
GIS analysis functions are capable of processing spatial and attribute data together.
Based on GIS data model, GIS analysis functions can be categorised into vector and raster analysis functions.
Spatial Analysis 13
Vector analysis functions
Geographical query (introduced previously)
Data manipulation Topological overlay Buffering Terrain analysis (to be introduced later) Network Analysis (to be introduced later)
Spatial Analysis 14
Mostly for manipulate spatial data to fit into application specifications.
For example, in working with area objects to aggregate areas based on attributes:
Commonly a three-step procedure is used: Reclassify areas by a single attribute or some combination; Dissolve boundaries between areas of same type by delete
the arc between two polygons if the relevant attributes are the same in both polygons;
Merge polygons into large objects by recording the sequence of line segments that connect to form the boundary and assigning new ID numbers to each new object.
Data manipulation
Spatial Analysis 15
Reclassify, dissolve and merge
Soil types A, B and C with growth potentials d and f
Soil types A, B and C
Soil types A, B and C
Ad
Bd Cf
BfCd
Ad
A
B
B
C
CA
A
B
C
A
Reclassify
Dissolve & merge
Spatial Analysis 16
Topological overlay
Suppose individual layers have planar enforcement, when two layers are combined (overlaid or superimposed), the result must have planar enforcement as well.
New intersection must be calculated and created wherever two lines cross and a line across an area object will create two new area objects.
When topological overlay occurs, spatial relationships between objects area updated for the new, combined map.
Spatial Analysis 17
Point in polygon
ID Restaurant
1 McDonald
2 Pizza Hut
3 KFC
4 McDonald
5 Berger King
ID Town
A Shi Qi
B Gang Kou
C San Jiao
ID Town Restaurant
1 Shi Qi McDonald
2 Gang Kou Pizza Hut
3 Gang Kou KFC
4 San Jiao McDonald
5 San Jiao Berger King
Fast food restaurant
Towns
1 2
3
4 5
1 2
3
4 5
AB
C
Spatial Analysis 18
Line on polygon
ID Road No.
1 35
2 22
3 35
4 60
5 60
6 35
7 82
8 35
ID Geology
A Granite
B Sandstone
C Sand
ID Original Road No.
Geology
1 2 22 Granite
2 2 22 Sandstone
3 1 35 Sandstone
4 3 35 Sandstone
5 4 60 Granite
6 4 60 Sandstone
7 5 60 Sandstone
8 6 35 Sandstone
9 6 35 Sand
10 7 82 Sand
11 8 35 Sand
Roads Geology12
345
67
8
1 2 3
456
78
910
11
AB
C
Spatial Analysis 19
Polygon on polygon
ID Watershed
County
1 1 A
2 1 B
3 3 B
4 2 A
5 2 B
6 4 B
7 2 C
8 4 C
Watershed
County
1
2
3
4A
B
C
1 2 3
4
5 6
7 8
Spatial Analysis 20
Buffering A buffer can be constructed around a point, line or area. Buffering algorithm creates a new area enclosing the
buffered object. The application of this buffering algorithms
fundamentally addresses the creation of zones around the target. e.g. protected zone around lakes, reservoirs or
streams zone of noise pollution around highways or airports service zone around bus route groundwater pollution zone around waste site
Spatial Analysis 21
Buffering on point, line and area
d
d
d
Buffering a point
e.g. area within 1km to a hospital. Buffering a
line
e.g. area within 100m to a road.
Buffering an area
e.g. area within 100m to a building.
Spatial Analysis 22
Buffering example
Spatial Analysis 23
Raster analysis functions
Local functions (point functions) Zonal functions (regional functions) Focal functions (neighbourhood
functions) Global functions
Spatial Analysis 24
Local functions
Local functions operate on the values of all the attributes relating to each cell (location). The operations are independent of the effects of attribute values from neighbouring cells.
A local function results in a new grid as a function of one or more input grids.
Spatial Analysis 25
The generic form of local functions
U = f (X1, X2, …)
For example:
new_map = old_map_1 + old_map_2
Spatial Analysis 26
Spatial context of local functions
X
Y
Z
A
B
U
U = f (A, B)
Spatial Analysis 27
Average
3.0
3.0
2.5
2.0
3.0
2.5
3.0
3.0
2.5
3.0
2.5
3.0
1.5
2.0
2.5
2.0
1
2
1
1
1
2
2
1
1
3
3
2
2
3
3
2
5
4
4
3
5
3
4
5
4
3
2
4
1
1
2
2= mean ,
n
ii
n
iii
n
XXXXfU
1
121 ),...,,(
Eg. outgrid = mean(ingrid_1, 2 * ingrid_2, (ingrid_3 + ingrid_4))
Spatial Analysis 28
Merge
1
4
1
1
1
3
4
1
1
3
3
4
1
3
3
2
1
N
1
1
1
N
N
1
1
3
3
N
N
3
3
N
5
4
4
3
5
3
4
5
4
3
2
4
1
1
2
2= merge ,
Eg. outgrid = merge(ingrid_1, ingrid_2, …)
If X1 == NODATA then
U = X2
elseU = X1
Spatial Analysis 29
Maximising
5
4
4
3
5
3
4
5
4
3
3
4
2
3
3
2
1
2
1
1
1
2
2
1
1
3
3
2
2
3
3
2
5
4
4
3
5
3
4
5
4
3
2
4
1
1
2
2= max ,
Eg. outgrid = max (ingrid_1, ingrid_2)
U = max (X1, X2, …)
Spatial Analysis 30
Minimising
1
2
1
1
1
2
2
1
1
3
2
2
1
1
2
2
1
2
1
1
1
2
2
1
1
3
3
2
2
3
3
2
5
4
4
3
5
3
4
5
4
3
2
4
1
1
2
2= min ,
Eg. outgrid = min (ingrid_1, ingrid_2)
U = min (X1, X2, …)
Spatial Analysis 31
Reclassification – arbitrary1
2
1
1
1
2
2
1
1
3
3
2
2
3
3
2
5
4
5
5
5
4
4
5
5
2
2
4
4
2
2
4
Given a1, a2, …, an
and b1, b2, …, bn
if X == a1 thenU = b1
else if X == a2 thenU = b2
…else
U = X
X U
123
542
Lookup table
Eg. If (ingrid == 1)outgrid = 5
else if (ingrid == 2)outgrid = 4
else if (ingrid == 3)outgrid = 2
endif
or outgrid = con(ingrid == 1, 5, ~con(ingrid == 2, 4, 2))
Spatial Analysis 32
3
N
N
N
3
N
N
3
3
N
N
N
4
N
N
4
1
2
1
1
1
2
2
1
1
3
3
2
2
3
3
2
5
3
3
3
5
3
3
5
5
3
2
5
2
2
2
2
Given a1, a2, …, an; b1, b2, …, bn;c1, c2, …, cn
if X1 == a1 and X2 = b1 thenU = c1
else if X1 == a2 and X2 == b2 thenU = c2
…else
U = NODATA
Eg. If (ingrid1 == 1 & ingrid2 == 2)outgrid = 1
else if (ingrid1 == 2 & ingrid2 == 2)
outgrid = 4else if (ingrid1 == 1 & ingrid2 == 5)
outgrid = 3endif
Coding scheme
ingrid2
ingri
d1 123
2 3 5
1 - 34 - -- - -
Boolean
Reclassification – Boolean
Spatial Analysis 33
Zonal functions
Zonal functions operate on properties of the region (or zone) to which a given cell belongs.
These properties might be: length, area or shape number of locations having a certain
attribute value on one grid that occurs within the area defined by a region on another grid.
Spatial Analysis 34
Characteristics of zonal functions Do not change boundaries of regions Change attribute values for each region (or
zone) according to its statistics or user’s specification
Useful for understanding spatial distribution of objects, quantitative measurement of shapes, statistical properties of objects and spatial associations
Spatial Analysis 35
Outcome of zonal functions
StatisticTables
Reclassify
Summarising properties of regions Spatial correlation
Spatial Analysis 36
Reclassification – statistical
SliceDivide range values intoin either equal intervalsor equal areas
Slice in equal intervals
Slice in equal areas
Outgrid = slice(ingrid, ~EQAREA | EQINTERVAL, ~nzones, base_zone#, ~in_min, in_max)
Spatial Analysis 37
Zonal statistics
2.0
2.0
2.0
0.75
2.0
0.75
2.0
2.0
2.0
0.75
0.75
2.0
0.5
0.5
0.75
0.75
4
4
4
3
4
3
4
4
4
3
2
4
1
1
2
2= zonalarea
Database definition: 1 cell = 2,500 m2Unit: km2
Zonal AreaReassign the value to each region according to the area measurement
Outgrid = zonalarea (ingrid)(based on 50x50m grid cell size)
Spatial Analysis 38
The focal and global functions The focal functions relate a cell to its
neighbours. These are functions that explicitly make
use of some kind of spatial associations in order to determine the value for the locations on the new output grid.
Spatial Analysis 39
Focal function parameters
Every focal function requires at least three basic parameters: Target location(s) (neighbourhood focus) A specification of the neighbourhood
around each target A function to be performed on the
elements within the neighbourhood
Spatial Analysis 40
Problem addressed by focal functions
Fire station
Question: What is the number of residential buildings within 5km to the given fire station?
Target: fire station
Neighbourhood: the area within 5km radius
Function: count the number of residential buildings
Spatial Analysis 41
Spatial search
Compute an attribute value for each target cell as a function of attribute values of its neighbourhood in an existing grid.
Target: target cell(s) on focal grid Functions: sum, mean, standard deviation, etc. Neighbourhood: circular, square or “ring-shape”
Spatial Analysis 42
Focal statistics
1
4
3
5
6
3
2
2
1
5
1
1
2
1
2
6
2
3
1
7
5
5
4
7
5
6
2
2
4
5
6
8
2
8
6
4
3
1
7
8
3
2
3
5
1
1
4
3
1
2
2
4
3
2
1
2
5
2
2
6
5
7
3
2
3.5
3.8
1
4
3
5
6
3
2
2
1
5
1
1
2
1
2
6
2
3
1
7
5
5
4
7
5
6
2
2
4
5
6
8
2
8
6
4
3
1
7
8
3
2
3
5
1
1
4
3
1
2
2
4
3
2
1
2
5
2
2
6
5
7
3
2
Focal mean
Focal grid
Data grid
Result grid
Spatial Analysis 43
Contiguity
Uniquely identifying individual contiguous groups or “clumps” of cells on an existing grid
The output grid has every polygon (or group of cells) uniquely numbered ranging from 1 to n, where n is the total number of polygons found in the grid.
Spatial Analysis 44
Contiguity analysis outcome
1
1
5
5
1
2
2
2
1
5
5
1
1
1
2
4
1
3
3
1
1
5
4
5
2
2
2
2
4
5
5
5
2
2
2
4
3
1
4
5
3
2
3
3
1
1
4
4
3
2
3
1
4
1
1
2
3
2
3
4
4
4
1
2
1
1
4
4
7
11
11
11
1
4
4
7
7
7
11
13
1
5
5
7
7
12
13
12
2
2
2
2
8
12
12
12
2
2
2
8
6
9
14
12
3
2
6
6
9
9
14
14
3
2
6
9
10
9
9
15
3
2
6
10
10
10
9
15
Spatial Analysis 45
Proximity
Compute an attribute value for each cell according to the length of the shortest path between that cell and the target location or area.
The distance can be measured in Euclidean distance or “cost distance” (or “weighted distance”).
The least-cost path is the route between two targets where the cost distance is the minimum.
In many cases, the cost distance is different from the Euclidean distance.
Spatial Analysis 46
Proximity analysis variables
A
1 2 3 4 5
6
7
B
A
1 2 3 4 5
6
7B
Absolute Barrier
89
A
1 2 3 4 5
6
7B
89
Travel zones defined by Euclidean distance The effect of an
absolute barrier on travel zones
The effect of a partial barrier (friction) on travel zones
Spatial Analysis 47
Spatial analysis procedure
Establish the objectives and criteria for the analysis.
Prepare the data for spatial operations. Perform the spatial operations. Prepare the derived data for tabular
analysis. Perform the tabular analysis. Evaluate the interpret the results. Refine the analysis as needed.
Spatial Analysis 48
Summary
One most significant advantage for GIS is the capability for geographical analysis.
GIS analytical capabilities are closely related to its data model.
Vector data analysis functions include, e.g., geographical query, manipulation, topological overlay, buffering, terrain analysis and network analysis.
Raster data analysis functions include, e.g., local, zonal, focal and global functions.