Outline
Definition: spatial analysis
Types
For example, this
Spatial Queries
Examples
Example of a spatial query
In QGIS, you can do a simple query by clicking the Identify Features
button
… and clicking on a polygon (or point, line, grid cell)
This polygon represents the Williamsburg, Brooklyn community district
What if we wanted to select all districts in a borough?
Select Features by Expression
toolEdit
menu \(\to\) Select
submenu \(\to\) Select Features by Expression...
)NYC_Pop_Borough
\(=\) 'Manhattan'
Here are the features we just selected.
Clear the selection by pressing Deselect Features from All Layers
button
Measurement
Examples
Distance between point \(a\) and \(...\)
Measures of Length
Euclidean distance (2-dimensions)
Oldie, but goodie
Great Circle distance
Circles are great
Shortest distance \(\neq\) straight line
In QGIS, many of these capabilities are embedded in the Processing Toolbox
For example, here is where you find the tool to create a distance matrix.
… some basic geometry measurements are also in the Field Calculator
Measures of Length
Why projections matter
Transformations
Examples
Point-in-polygon
(“how many crimes in each police precinct?”)
ncrimes
)
Point-in-polygon
Line-in-polygon
(“how many miles of paved road in each district?”)
pvdroadlength
)
Line-in-polygon
Buffers
(“which areas are within 5 miles of toxic waste site?”)
Buffers
Kernel density
(“where are crime hotspots?”)
Kernel density
Point-in-polygon transformation
Examples
Generalization
Assignment
Generalization example
Joining Datasets
Joining by attribute
Join-by-attribute example
Join-by-location example
Modifiable Areal Unit Problem
MAUP
Example
Which map is best?