Chapter 14

Raster Analysis

Math with maps. Learn the foundations of Map Algebra and discover how to perform complex site selection and suitability modeling.

At a Glance

Prereqs: Chapters 01, 13 Time: 30 min read + 35 min practice Deliverable: Raster workflow result map

Learning outcomes

  • Apply basic map algebra operations to rasters.
  • Explain how NoData and alignment affect results.
  • Build a small raster workflow tied to an RS product (index, DEM).

Key terms

map algebra, NoData, resampling, alignment, focal/zonal operations

Stop & check

  1. Why do two rasters need matching alignment and cell size for map algebra?

    Answer: So each cell-to-cell operation compares the correct locations.

    Why: Misalignment mixes different ground locations and creates artifacts.

    Common misconception: Reprojection alone guarantees alignment; you often need a snap raster.

  2. What does NoData usually do in calculations?

    Answer: It propagates (many operations output NoData).

    Why: Undefined inputs lead to undefined results unless handled explicitly.

    Common misconception: NoData equals zero; it means missing/invalid.

Try it (5 minutes)

  1. Predict what happens if you add two rasters with different resolutions.
  2. Write one sentence: what choice does the software have to make?

Lab (Two Tracks)

Both tracks produce the same deliverable: one raster analysis output plus a 6-sentence methods note.

Desktop GIS Track (ArcGIS Pro / QGIS)

Run a reclass or focal statistic on an index/DEM and produce a map with a legend.

Remote Sensing Track (Google Earth Engine)

Compute an index (e.g., NDVI) and apply a threshold or neighborhood operation. Export a figure.

Common mistakes

  • Mixing meters and degrees in distance-based rasters.
  • Ignoring NoData masks and interpreting gaps as low values.
  • Comparing rasters from different dates without stating it.

Further reading: https://gistbok-ltb.ucgis.org/

🧮 What is Map Algebra?

Because raster data is essentially a matrix of numbers, we can perform mathematical operations on maps. This framework, developed by Dana Tomlin, treats geographic layers as variables in an equation.

🔑 The Equation: Input Layer + Function = Output Layer.

The Four Scopes

Raster operations are categorized by how many cells they "look at" to calculate an answer:

  • Local: Uses only the cell at the same location (Cell-by-cell).
  • Focal: Uses a neighborhood of cells (e.g., 3x3 window).
  • Zonal: Uses all cells within a specific region or "zone."
  • Global: Considers every cell in the entire map.
Critical GIS: The Bias of Weights

In Weighted Overlay (Suitability Modeling), choosing the weights is a political act. If you weight "Land Cost" as 80% and "Ecological Impact" as 20% for a new highway, the model will "suitably" route it through wetlands or low-income neighborhoods where land is cheap. The math is perfect, but the outcome is biased by the values you fed it.

Interactive: Local Algebra (Add)

Watch how [A] + [B] = [Result] for every pixel

Layer A
+
Layer B
=
Result

Case Study: The Salamander Paradox

A student used GIS to protect an endangered blind salamander in Texas. The theory was simple: More Concrete = More Runoff = Dead Salamanders.

She used NDVI to map concrete vs. vegetation and a DEM to map flow direction. The boolean model predicted disaster.

The Surprise Result:

The developers had indeed built more concrete (bad). However, they had also re-engineered the landscape to divert drainage away from the sensitive spring to protect their own investment from flooding.

The Outcome: The salamanders actually ended up with less polluted runoff than before the development. The sheer complexity of human-environment interaction means your initial hypothesis—even one backed by "common sense" GIS logic—can be completely wrong.

Summary of Big Ideas

  • Reclassification allows us to simplify complex values into simple ranks (e.g., 1-10).
  • Weighted Overlay combines multiple factors with different levels of importance.
  • Euclidean Distance calculates the straight-line distance to the nearest source.
  • Surface Analysis (Slope, Aspect) is a focal operation derived from elevation data.

Chapter 14 Checkpoint

1. Which operation would you use to find the average elevation of every "County" polygon?

Focal Statistics
Zonal Statistics

2. A "Slope" map is created by looking at a pixel and its eight immediate neighbors. This is a:

Focal Operation
Global Operation

📚 Chapter Glossary

Map Algebra A language that defines a set of operations for manipulating raster data to produce new raster data (e.g., Output = LayerA + LayerB).
Focal Operation An operation that calculates a value for each cell based on the values of its neighboring cells (e.g., Smoothing, Slope).
Zonal Operation An operation that computes a single value for every cell within a defined zone or region (e.g., Average Elevation per County).
← Chapter 13: Spatial Analysis (Intro) Next: Chapter 15: Vector Analysis →

BoK Alignment

Topics in the UCGIS GIS&T Body of Knowledge that support this chapter.