PadhaikoAll subjects

Spatial Analysis

Geographical Information Systems (ENCT 468)

Open in the Padhaiko app

6.1 Classification of analytical capabilities

Spatial analysis transforms raw geometric and attribute data into actionable spatial knowledge by examining locations, attributes, and topological relationships. Analytical GIS functions are commonly grouped into four foundational categories:

  1. Retrieval: Selective extraction of spatial features and attributes without modifying the underlying geometry—via attribute queries (population > 50000), spatial window/radius queries, or topological selection.
  2. Measurement: Quantifying geometric properties directly from coordinates:
    • Euclidean Distance: (vs. Manhattan Distance: ).
    • Polyline Length: Sum of segment lengths along vertices.
    • Polygon Area (Shoelace / Surveyor's Formula):
  1. Classification: Assigning features or raster cells into meaningful discrete categories based on attribute thresholds (e.g., grouping slope angles into Flat, Moderate, Steep).
  2. Reclassification: Reassigning existing class codes or continuous values into new target values (often suitability scores – or binary masks 0/1) without changing spatial geometry, preparing layers for overlay or MCDA.

6.2 Vector analysis

Vector analytical operations create new geometries or filter existing features using exact coordinate mathematics:

Core Vector Analysis Operations
OperationInput(s)Output & Attribute BehaviorTypical GIS Use Case
BufferingPoint, line, or polygon + distance Polygon zone within distance (constant or attribute-driven variable width; dissolved or individual) river setback zone; school noise buffer
IntersectLayer + Layer Only the overlapping area (); retains attributes from both and Parcels lying inside a -year flood zone with both parcel ID and flood depth
UnionPolygon + Polygon Complete combined extent (), split along all intersecting boundaries; keeps attributes from both (nulls where disjoint)Combining soil polygons and land-use polygons over a whole district
ClipInput + Clip polygon Cookie-cutter crop of to 's boundary (); retains only 's attributesTrimming a national road network to Kathmandu District boundary
Erase (Difference)Input + Erase polygon Portions of lying outside ()Excluding protected national parks from buildable land
DissolvePolygons/lines + grouping attributeMerges adjacent features sharing the same attribute value, removing internal bordersAggregating municipal wards into district polygons
Spatial SelectionTarget layer + selector layerSubset of existing features satisfying a DE-9IM predicate (Intersects, Within, Touches)Selecting all wells located within contaminated aquifer zones
Thiessen (Voronoi) PolygonsSet of seed points Exhaustive partition into polygons where every point in is closer to than to any other Delineating rain-gauge catchment areas or nearest-clinic service territories

6.3 Raster analysis and map algebra

Map Algebra (formalized by C. Dana Tomlin) treats aligned raster layers as mathematical grids combined through expressions across four spatial scopes:

  1. Local Operations (Cell-by-Cell): Output value at depends only on the input value(s) at the exact same cell . Examples: arithmetic (), , Boolean AND/OR, and reclassification.
  2. Focal (Neighborhood) Operations: Output at is a function of and its surrounding moving window (commonly Moore or -connected von Neumann neighborhood). Examples: mean/median smoothing filters, Sobel edge detection, and finite-difference terrain slope and aspect from a DEM.
  3. Zonal Operations: Computes summary statistics (sum, mean, min, max, majority, range) on a value raster grouped across every zone defined by a categorical zone raster (e.g., mean annual rainfall per watershed zone).
  4. Global Operations: Output at every cell depends on values across the entire raster extent. Examples:
    • Euclidean Distance Surface: Straight-line distance from every cell to the nearest source cell (e.g., distance to nearest road).
    • Cost-Distance (Least-Cost Path) Surface: Minimum accumulated travel cost across a friction/cost surface raster (e.g., modeling wildlife corridors or highway routing across slope and land-cover costs).
    • Viewshed & Flow Accumulation: Line-of-sight visibility and hydrologic basin accumulation.
  5. Resampling: Aligns cell grids of differing resolutions or projections via Nearest Neighbor (categorical data), Bilinear Interpolation ( weighted average for continuous DEMs), or Cubic Convolution ( smooth fit for imagery).
Example 1

1 (5 marks)

Given a elevation window (in meters) centered on cell with value and a zone ID raster:

3x3 Elevation and Zone RastersText
Elevation Raster (Z):      Zone Raster (ID):
100  110  120              1  1  2
100  130  140              1  2  2
110  120  150              1  2  3

Compute:

  1. A local operation doubling the center cell value minus .
  2. The focal mean smoothing value at the center cell.
  3. The zonal maximum elevation for Zone 2.

Local operation at center cell : Uses only :

Focal mean at center cell: Averages all cells in the neighborhood:

Zonal maximum for Zone 2: Cells belonging to Zone 2 are , , , and :

Answer:
  1. Local output
  2. Focal mean
  3. Zonal maximum for Zone 2

6.4 Network analysis

A GIS network models linear movement of vehicles, pedestrians, water, or electricity as a mathematical graph :


6.5 Spatial interpolation

Spatial interpolation predicts unknown field values at unsampled locations from known sample points , guided by Tobler's First Law of Geography ("Everything is related to everything else, but near things are more related than distant things").

Deterministic Interpolation Methods

  1. Thiessen (Nearest Neighbor): Assigns . Produces discontinuous stair-step polygons; suited only for categorical or sparse nominal estimates.
  2. Inverse Distance Weighting (IDW): Computes a weighted average where influence decays with distance raised to power (typically ):
  1. Splines (Minimum-Curvature Surfaces): Fits smooth piecewise polynomials passing through (or near) all sample points while minimizing total surface bending energy. Produces smooth contour surfaces and can extrapolate local highs/lows slightly beyond observed sample extrema, though vulnerable to wild overshoot across sharp cliffs.

Geostatistical Interpolation: Semi-Variogram and Kriging

Unlike deterministic methods, geostatistics models spatial autocorrelation statistically via the empirical semi-variogram at lag distance :

Definition

Three Key Semi-Variogram Parameters

Fitting a theoretical model (Spherical, Exponential, or Gaussian) to yields three diagnostic parameters:

  1. Nugget (): Non-zero discontinuity at , reflecting measurement error and micro-scale variation below the sampling spacing.
  2. Sill (): The asymptotic variance plateau reached at large distances where spatial correlation vanishes ( is the partial sill).
  3. Range (): The lag distance at which reaches the sill; sample pairs separated by are spatially uncorrelated.

Using the fitted variogram, Ordinary Kriging computes optimal unbiased weights minimizing prediction error variance—simultaneously producing both an interpolated surface and a spatial kriging variance (uncertainty) map.

Example 2

2 (6 marks)

Three rain gauges record daily rainfall: at , at , and at from an unsampled farm . Estimate the rainfall at using IDW with power parameter .

Compute the inverse-distance weights :

(Equivalently, multiplying all weights by leaves ratios unchanged: .)

Compute the weighted sum and total weight:

Divide to obtain :

Answer:

The IDW () rainfall estimate at is ().


6.6 Spatial statistics, MCDA and error propagation

  1. Spatial Autocorrelation (Global Moran's ): Measures whether attribute values across polygons/points are clustered, dispersed, or spatially random given a spatial weights matrix (e.g., contiguity or inverse distance):
  1. Hot-Spot Analysis (Getis–Ord ): Global Moran's gives a single summary index for the whole study area; local statistics pinpoint where clusters occur. Getis–Ord computes a local -score for every feature by comparing the local weighted sum of and its neighbors to the global mean: high positive -scores () indicate statistically significant hot spots, while strongly negative -scores () mark cold spots.
  2. Multi-Criteria Decision Analysis (MCDA): Combines multiple standardized suitability criteria layers (e.g., slope, road proximity, land cover) with normalized preference weights (, often derived via Analytic Hierarchy Process, AHP) and binary exclusion constraints using Weighted Linear Combination (WLC):
  1. Error Propagation in Spatial Analysis: When combining multiple uncertain layers , individual positional or attribute errors combine into the output:
    • Analytical Taylor Propagation (independent inputs):

For example, when adding two independent rasters , variances add: .

added

Question 1

Differentiate between Intersect, Union, Clip, and Erase vector overlay operations regarding output geometry and retained attributes. Using the Shoelace formula, verify the area of a trapezoid with vertices .

Distinguish the four vector overlay operations:

  • Intersect (): Outputs only shared overlapping geometry and merges attribute columns from both and .
  • Union (): Outputs the full combined footprint split at all intersections and merges attributes from both layers.
  • Clip (): Crops to 's boundary like a cookie-cutter, preserving only 's attributes.
  • Erase (): Removes the area overlapping from , keeping remaining parts of with 's attributes.

Compute the trapezoid area via the Shoelace formula: Vertices in order: :

(Checks with trapezoid formula: .)

Answer:

Intersect keeps with combined attributes; Union keeps with combined attributes; Clip crops by keeping only 's attributes; Erase removes from . The trapezoid area is .

Question 2

Explain Tomlin's four Map Algebra operation scopes (local, focal, zonal, global) with one concrete GIS example of each.

Define and illustrate each scope:

  1. Local: Evaluates each cell independently from co-located cells across input layers (e.g., computing ).
  2. Focal: Evaluates each cell using a moving neighborhood window around (e.g., slope calculation from a DEM or low-pass smoothing filter).
  3. Zonal: Aggregates values of a value raster within each region defined by a zone raster (e.g., calculating average elevation per administrative ward).
  4. Global: Output at every cell depends on the entire raster domain (e.g., Euclidean distance surface or least-cost path surface from source facilities).
Answer:

Map Algebra classifies raster operations by neighborhood scope: Local (single-cell math, e.g., NDVI), Focal (moving window, e.g., slope), Zonal (statistics per zone ID, e.g., mean rainfall per watershed), and Global (full-grid dependency, e.g., cost-distance surface).

Question 3

Compare Dijkstra's algorithm and for network shortest-path routing, and explain what service area and location-allocation analyses compute.

Dijkstra vs. :

  • Dijkstra expands vertices strictly by known cumulative cost from the origin, exploring uniformly in all directions; always optimal for non-negative weights.
  • prioritizes vertices by where is an admissible straight-line distance/time heuristic toward the destination, dramatically pruning nodes searched in the wrong direction while guaranteeing optimality.

Service area and location-allocation:

  • Service Area (Isochrone): Traces all street segments and catchment polygons reachable from a facility within a travel-time or distance budget (e.g., -minute ambulance coverage).
  • Location-Allocation: Chooses optimal candidate facility sites (-median or maximum coverage) to minimize total population travel cost or maximize covered demand.
Answer:

Dijkstra searches radially using , whereas guides search toward the target via with an admissible heuristic. Service area maps reachable impedance zones around facilities, while location-allocation selects optimal facility sites for distributed demand.

Question 4

Compare IDW and Ordinary Kriging as spatial interpolation methods, and define Nugget, Sill, and Range in a semi-variogram. Two elevation benchmarks () and () surround target . Compute the IDW () elevation estimate at .

Compare IDW vs. Kriging and define variogram terms:

  • IDW assigns purely geometric distance-decay weights (), ignores directional clustering, and provides no error estimate. Ordinary Kriging fits an empirical semi-variogram to derive statistical BLUE weights that account for spatial structure and cluster redundancy, plus outputs prediction variance.
  • Nugget (): Variance jump at (measurement noise/micro-variation); Sill (): Maximum variance plateau; Range (): Distance beyond which spatial autocorrelation ceases.

Compute the IDW () elevation at :

Answer:

IDW uses fixed geometric weights (), while Kriging models spatial correlation via a semi-variogram (nugget = zero-lag noise, sill = variance plateau, range = correlation distance) and provides error variance. The IDW () estimate at is .

Question 5
  1. Interpret positive, zero, and negative values of Global Moran's , and distinguish it from Getis–Ord hot-spot analysis.
  2. In a site-suitability MCDA (WLC) model, three standardized criteria have weights , , and scores , , at a candidate site. Compute its suitability score .
  3. If two independent input layers () and () are summed as , compute the propagated standard error .

Interpret Moran's vs. :

  • Global Moran's : (near ) indicates spatial clustering of similar values; indicates spatial randomness; (near ) indicates dispersion (high next to low).
  • Getis–Ord : A local statistic returning a -score per location to pinpoint exact hot spots (clusters of high values) and cold spots (clusters of low values), which global Moran's cannot locate.

Compute MCDA suitability score and propagated error :

Answer:
  1. Moran's = clustered, = random, = dispersed globally; locates specific local hot/cold spots.
  2. Suitability score .
  3. Propagated standard error .
← Spatial Databases and Data ManagementGeo-visualization and Cartography →