Spatial Queries & Analysis in GIS Dr Nigel Trodd Coventry University
Dec 21, 2015
Spatial Queries & Analysis in GIS
Dr Nigel Trodd
Coventry University
Aim
Your aim is to better understand the reasons for and methods of spatial queries and spatial analysis
a fundamental question ...
whywhywhywhywhy
perform
spatial
analysis
?
Why?
The cost of data input to a GIS is high, and can only be justified by the benefits of analysis / modelling / decision-making performed with the data. 60 polygons per hour = $1 per polygon estimates as high as $40 per polygon 500,000 polygon database costs $500,000
to create using the low estimate $20m using the high estimate
What can justify these costs?
Query if it is faster than manual lookup
Analyses which are simple in nature but difficult to execute manually map measurement, particularly area
Analyses that exploit GIS capabilities for data integration Exploratory spatial data analysis
Analyses that develop spatially distributed modelsPredictions that support decision-makers Simulations, hypothesis testing
Objectives
In this lecture we willIdentify spatial queriesidentify a range of spatial operations available to you in a GIS.explain the principles of the algorithms on which these operators are based.
what is data analysis?
...the
data information
transformation
So, what is a spatial query?
SelectExtractInteractive query
examples
What Qs are spatial Qs?
What is where? What is found at a location?
Where is what? Where can you find a feature?
But, spatial queries are NOT spatial analysis
What is spatial analysis?
Data analysis transforms data into useful informationA method of analysis is spatial if the results depend on the locations of the entities being analyzed move the feature(s) and the results
changeOr the analysis modifies the geometry or
creates new geometry
Spatial operations
Berry, J.K., 1987, Fundamental operations in computer-assisted map analysis, International Journal of GIS 1 119-36.
Reclassifying maps
Topological overlay
Measuring distance and connectivity
Characterizing neighbourhoods
y = f(x)y = f(x)
Reclassify and then merge adjacent areas with the same attribute i.e. change geometry
Reclassify
Overlay analysis
Point-in-polygonLine-in-polygonPoint-on-lineLine-on-linePolygon-on-polygon
But, visually superimposing 2 or more layers is NOT an overlay
operation
Point in Polygon overlay
Determine whether a point lies inside or outside a polygon used to assign crimes to police beats,
voters to enumeration districts, children to school catchments, patients to PCTs
Point in Polygon Algorithm
Draw a line from the point to infinity in any direction, and
count the number of intersections between this
line and each polygon’s boundary.
The polygon with an odd number of intersections is the containing polygon: all
other polygons have an even number of intersections.
Polygon on Polygon overlay for vector data
Two polygons (A, B) are intersected to form 9 new
polygons.
One is formed from both input polygons; four are
formed by Polygon A and NOT Polygon B; and four are formed by Polygon B
and NOT Polygon A.
A B
Polygon on Polygon overlay for raster data
Polygon on Polygon algorithms
• Algebraic
• Statistical
• Boolean
Proximity analysis: buffering
Create a new area within a user-defined distance of an existing entitye.g., to determine areas impacted by a proposed
highway
Point
Line
Area
Contiguity analysis
Which states share a border with Missouri?
…a question of connectivity
Neighbourhood analysiscalculate an output value at a location from the values at nearby locations… as determined by a moving-window
Spatial Queries & Spatial Analysis
Queries manipulate the databaseAnalysis transforms data into informationSpatial analysis transforms spatial data4 basic types of spatial operationSeveral operators of each typeAlgorithms for raster and vector data models