Lesson 5.1Lesson 5.1 · Raster & Terrain Analysis
Raster Analysis and Map Algebra
When the map becomes arithmetic you can do cell by cell
Two flood layers, one question: where is it deep AND close to my plot?
You have a raster of water depth and a raster of distance to the site, both on the same 30 m grid. In a drawing you would eyeball the overlap. In a GIS you type a formula and the software answers cell by cell, across a million cells, in a second. That is raster analysis: the map has become a spreadsheet you can do arithmetic on. This lesson teaches the arithmetic, the vocabulary that organises it, and the reclassify step that lets unlike layers be compared at all.
The raster calculator is the most powerful button in GIS and the easiest to misuse. Respect the grid.
Every raster is a grid of numbers - so you can do maths on it
A raster is a grid of square cells, each holding one number: an elevation in metres, a temperature, a land-use code, a rainfall total. Because the whole layer is just numbers laid out in rows and columns, you can treat it like a giant spreadsheet and do arithmetic on it. Add two rasters and the GIS adds cell 1 of the first to cell 1 of the second, cell 2 to cell 2, and so on to the end. This is map algebra - a term coined by Dana Tomlin - and it is the beating heart of Module 5.
The golden rule is that the cells must line up. Two rasters can only be added, subtracted or compared if they share the same extent (they cover the same ground), the same resolution (the cells are the same size), and the same CRS (they are in the same coordinate system). If a 30 m CartoDEM and a 10 m Sentinel layer disagree on any of these, the maths is nonsense - you would be adding an elevation from one place to a value from another. In practice you resample and align first (Module 3's skills), then compute.
A raster is a spreadsheet wearing a map's clothes. Never forget the spreadsheet underneath.
Reclassify: putting unlike layers on one honest scale
Raw rasters speak different languages. Slope is in degrees, distance is in metres, land use is a set of codes. You cannot meaningfully add 18 degrees of slope to 400 metres of distance. So before you combine layers you reclassify each one onto a shared, ranked scale - typically a small set of ordered classes such as 1 (good), 2 (fair), 3 (poor).
Reclassifying is a lookup: you write a rule - slope 0 to 5 degrees becomes class 1; 5 to 15 becomes 2; over 15 becomes 3 - and the GIS rewrites every cell. It is the single most useful raster operation for a designer, because it is how a continuous surface (a smooth DEM) turns into a decision surface (buildable / caution / avoid). Choose your class breaks honestly: they carry judgement, and a lazy break can quietly decide a whole analysis. Where a threshold matters - a legal flood level, a maximum ramp gradient - anchor the break to a real standard, not a round number that looked tidy.
Class breaks are opinions in disguise. State them out loud and defend them.
Tomlin's four families: local, focal, zonal, global
Dana Tomlin's cartographic modelling organises every raster operation by one question: which input cells feed one output cell?
Local operations use only the cell in the same position - across one raster (reclassify) or several (add three suitability layers). Focal (neighbourhood) operations use a moving window around each cell - a 3x3 or larger kernel - to compute things like a smoothed average, or slope, which needs the neighbours to see the tilt. Zonal operations summarise cells grouped by a zone: mean elevation per ward, maximum flood depth per plot. Global operations use the whole grid at once - distance from every cell to the nearest road, or the cost of travelling across the surface.
Once you can name an operation as local, focal, zonal or global, you can find it in any software's menu and reason about what it needs. Slope? Focal. Average rainfall per district? Zonal. Nearest-hospital distance? Global.
Chaining operations into a model
Real analysis is rarely one sum. You reclassify slope, reclassify flood depth, reclassify distance-to-road, then add the three - a local operation on the results of three earlier ones. A sequence of raster operations like this is a cartographic model, and it is worth building it as a documented chain rather than a pile of throwaway clicks.
Both QGIS (the Graphical Modeler) and ArcGIS Pro (ModelBuilder) let you wire operations into a visual flowchart you can re-run, tweak and hand to a colleague. This matters professionally: an analysis you can reproduce and explain is evidence; a one-off map nobody can rebuild is just an assertion. In Module 5.4 the whole suitability method is exactly such a chain.
Watch the edges, the NoData and the number type
Three quiet traps catch beginners. First, NoData: cells with no value (outside the study area, or gaps in the source) are not zero - they are absent, and most tools propagate NoData through a calculation so one missing input can blank an output cell. Decide deliberately whether to fill, mask or ignore them. Second, integer versus float: dividing two integer rasters can truncate (7 / 2 becomes 3, not 3.5) unless you force floating-point output - a classic silent error in slope and index calculations. Third, edges: focal operations have no full window at the raster's border, so results there are weaker; clip your DEM generously beyond the site so the edge effects fall outside your area of interest.
NoData is not zero. Zero is a measurement; NoData is a shrug.
CartoDEM (via Bhuvan)
India national DEM from Cartosat-1 stereo, 30 m and 90 m
Free download via Bhuvan (registration); the default elevation raster for Indian raster analysis. bhuvan.nrsc.gov.in
NASA SRTM
Global radar DEM, ~30 m (1 arc-second)
Public domain, free via USGS EarthExplorer/EarthData; a quick global fallback grid to practise map algebra on.
OGC WCS (Web Coverage Service)
Standard for serving raster/coverage data as analysable values
Lets you pull DEM or imagery cells (not just a picture) from a server straight into QGIS or ArcGIS for calculation.
GeoTIFF / COG
The standard single-file raster container (Cloud-Optimized GeoTIFF)
What most DEMs and index outputs are stored as; carries the CRS and cell size that map algebra depends on.
Workshop - build a two-factor buildability raster
You will reclassify a slope raster and a flood-proximity raster, then add them to make a simple buildability surface for a real Indian site - proving map algebra end to end.
QGIS 3.44 (GDAL/SAGA/GRASS providers built in) or ArcGIS Pro with Spatial Analyst; a CartoDEM tile from Bhuvan.
Given: a CartoDEM tile for your site (Bhuvan) + a river/waterbody line Goal: a 3-class buildability raster (1 good, 2 fair, 3 poor) Time: ~60 minutes
- 1Load the DEM and confirm its CRS and cell size. Reproject both inputs to a metre-based projected CRS for your zone (e.g. UTM). In QGIS: Raster menu; in ArcGIS Pro: Project Raster (Data Management).
- 2Derive slope in degrees. In QGIS: Raster > Analysis > Slope (or the GDAL slope algorithm). In ArcGIS Pro: Spatial Analyst > Surface > Slope.
- 3Reclassify slope into 3 classes (0-5 = 1, 5-15 = 2, over 15 = 3). In QGIS: Raster > Raster calculator or the SAGA/GRASS reclass tool. In ArcGIS Pro: Spatial Analyst > Reclass > Reclassify.
- 4Build a distance-to-water raster and reclassify it the same way (far = 1, mid = 2, near = 3). In QGIS: Proximity (Raster Distance), then reclass. In ArcGIS Pro: Distance Accumulation (or Euclidean Distance), then Reclassify.
- 5Add the two class rasters with map algebra. In QGIS: Raster Calculator, expression slopeclass + floodclass. In ArcGIS Pro: Spatial Analyst > Raster Calculator. Style the sum from low (best) to high (worst) and read off where to build.
You’ll walk away with
A buildability raster and a written note of your class breaks and why you chose them - your first reproducible cartographic model.
Three altitudes on the same idea
Read the band that fits you — or all three.
Map algebra is how you turn a DEM into site intelligence. Reclassify slope into buildable / cut-and-fill / avoid, combine it with an aspect layer for solar orientation, and you have a defensible siting diagram before the first sketch. You will lean on this constantly in Module 7's site analysis - the raster is where the ground's behaviour lives.
Reclassify-and-overlay is the statutory planner's core method. Land capability, hazard zonation and developable-land assessments in master and development plans are, underneath, ranked rasters added with weights. Understanding local versus zonal operations lets you produce ward-level and zone-level summaries that plug straight into a plan document.
Raster math quantifies the qualities you argue about. Sun hours on a square, a heat-exposure index across a block, walkable-slope surfaces for a street network - each is a reclassified, combined raster. It converts 'this plaza will bake in May' from a hunch into a mapped, comparable number.
“Raster analysis is only for terrain and satellite imagery - not for design decisions.”
Do it yourself
No software needed - just reason like the raster engine.
- 1Classify each as local, focal, zonal or global: (a) mean elevation per ward, (b) slope, (c) reclassifying land use, (d) distance to the nearest hospital.
- 2You add a 30 m DEM to a 10 m rainfall raster and get garbage. Name the three things that must match before the sum is valid.
- 3Write a 3-class reclassify rule for 'distance to a bus stop' for a walkability study, and justify each break in one line.
- 4A slope-index calculation returns whole numbers only when you expected decimals. What is the single most likely cause?
- 5Why is NoData dangerous to treat as zero in a flood-depth raster? Give a one-sentence consequence.
The one line to carry out
Peer-reviewed journals & authoritative standards
- 01Tomlin, C.D. — GIS and Cartographic Modeling — Esri Press, 2012.
- 02Burrough, P.A., McDonnell, R.A. & Lloyd, C.D. — Principles of Geographical Information Systems, 3rd ed. — Oxford University Press, 2015.
- 03de Smith, M.J., Goodchild, M.F. & Longley, P.A. — Geospatial Analysis: A Comprehensive Guide, 7th ed. — Winchelsea Press, 2025.
- 04Longley, P.A., Goodchild, M.F., Maguire, D.J. & Rhind, D.W. — Geographic Information Science and Systems, 4th ed. — Wiley, 2015.
- 05Chang, K.-T. — Introduction to Geographic Information Systems, 9th ed. — McGraw-Hill Education, 2019.
The most important rasters a designer builds are made FROM the DEM - slope, aspect, hillshade and contours - so next we turn a bare elevation grid into the terrain products a site actually needs.
The author
Amogh N P
Architect, interior designer, and creative polymath. Studio Matrx began in his notebooks — his vision of design made honest, useful, and open to everyone. Its Academy is written and taught in his memory, and free, forever.
More about Amogh →