- Introduced by
- Dana Tomlin
- Year
- 1990
- Type
- Raster spatial analysis framework
- Family
- Raster modeling
What does it do?
Map Algebra is a rule-based notation for deriving new raster layers from existing ones through arithmetic, logical, or statistical operations applied cell by cell, over neighborhoods, within zones, or across the whole grid.
Dana Tomlin set out its four operation classes (local, focal, zonal, and global) in his 1990 book Geographic Information Systems and Cartographic Modeling. It is used in environmental science, urban planning, hydrology, and land-use modeling wherever calculations on gridded data must respect spatial position.
The intuition behind the method
Think of each raster layer as a grid in which every cell holds a number for some geographic property, such as elevation or land cover. Map Algebra combines these grids with ordinary mathematical expressions: adding two layers, taking the minimum across three, or averaging the cells inside a moving window. Because each cell is evaluated at its own position, the result is a map that is spatially meaningful rather than a single summary value.
History
C. Dana Tomlin formalized the framework in his 1990 book Geographic Information Systems and Cartographic Modeling, which organised spatial operations on raster layers into local, focal, zonal, and global classes. The algebra is now implemented in the raster tools of several GIS packages, listed under in-practice tools below.
When to use it
Use Map Algebra when your data are already in raster form and you need to derive new spatial information through cell-wise arithmetic, logical tests, or neighborhood and zone summaries. All input layers must share the same coordinate system, spatial extent, and cell size before an expression is evaluated. Do not use it as the main tool for vector-only analysis unless the features are first rasterized, and avoid it for sparse point data, where the grid is mostly empty. When the question depends on statistical spatial dependence, geostatistical interpolation is more suitable, and when travel is constrained to a network, network analysis is more suitable.
Limitations and considerations
- Every input layer must share the same extent, projection, and cell size. Aligning layers that were produced from different sources can take considerable preprocessing time.
- Neighborhood operations are defined in cells rather than ground distance. A 3x3 window covers a different ground area when the cell size changes, so focal results from different resolutions are not directly comparable.
- Rasterizing vector features introduces quantization error at the chosen cell size, and this error carries forward through later algebra steps.
- The framework does not carry uncertainty in the input data. Error propagation has to be tracked separately, for example through Monte Carlo simulation.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Local operations depend only on the co-located cell values, so their outputs can be computed without reference to other cells. Global operations such as path-distance do not have this property, and the difference should be considered when planning computation.
- The four classes correspond to distinct spatial dependencies (same position, neighborhood, zone, and whole grid), so each step of a workflow states what spatial information it uses.
- A chain of expressions is an explicit record of the model. It can be saved as a script and rerun on new layers that have the same extent and cell size.
- Expression-based raster tools are available in several GIS environments, including ArcGIS Spatial Analyst, QGIS, GRASS GIS, and GDAL command-line utilities.
Applications
- Suitability modeling: overlaying slope, soil type, proximity to roads, and land-cover layers through weighted arithmetic to identify suitable sites for development or conservation.
- Hydrological analysis: deriving flow direction and flow accumulation grids from digital elevation models to delineate watersheds and stream networks.
- Wildfire risk mapping: combining fuel-load, slope, wind-exposure, and drought-index rasters to produce spatially explicit fire-hazard surfaces.
- Urban heat island analysis: subtracting rural reference temperature grids from urban surface temperature grids to quantify heat-island intensity across a city.
- Change detection: computing the arithmetic difference or ratio between two time-series rasters of the same variable, such as NDVI or land surface temperature, to map land-cover change.
How it works
How it works
Local operations apply a function to each cell using the values of one or more co-registered layers at that same position (i, j). Examples include adding an elevation layer to a slope layer, reclassifying land-cover codes, or multiplying a rainfall raster by a runoff-coefficient raster. Because each output cell depends only on the inputs at its own position, local operations can be computed for all cells independently of one another.
Formula
z_{out}(i,j) = f\bigl(z_1(i,j),\, z_2(i,j),\, \ldots,\, z_n(i,j)\bigr)Focal operations compute each output cell from the values inside a neighborhood N centred on that cell, such as a 3x3 window or a circular kernel. Typical uses include smoothing a digital elevation model with a mean filter, or deriving slope and local terrain roughness from elevation. The neighborhood shape and the summary function g are user-defined choices.
Formula
z_{out}(i,j) = g\!\left(\{z(i+\Delta i,\, j+\Delta j) : (\Delta i, \Delta j) \in \mathcal{N}\}\right)Zonal operations summarise all cells that share a zone identifier taken from a separate zone layer. For example, mean precipitation can be calculated for each watershed rasterized as a zone layer. Each cell receives the summary value of its zone, so the output keeps the raster structure while grouping cells spatially.
Formula
z_{out}(i,j) = h\!\left(\{z(i',j') : \text{zone}(i',j') = \text{zone}(i,j)\}\right)Global operations let the value at each output cell depend on cells across the entire study region, as expressed by the set R in the formula. Cost-distance or path-distance calculation is the main example, because accumulated travel cost propagates from source cells across the grid. Viewshed analysis and Euclidean distance surfaces are also global, since the value at one cell can depend on many others.
Formula
z_{out}(i,j) = \phi\!\left(\{z(i',j') : (i',j') \in R\}\right)Common pitfalls
- Mismatched projections or extents can produce silently incorrect results rather than an obvious error, so layer alignment should be checked before any expression is run.
- NoData cells usually propagate through arithmetic: if any input has NoData at a location, the output is often NoData there unless the case is handled explicitly.
- Treating categorical raster values, such as land-cover codes, as continuous numbers yields meaningless arithmetic. Reclassify them or use conditional expressions instead.
- The neighborhood in a focal operation reaches outside the grid for cells near the edge. How the software treats these missing neighbours varies, and it should be checked rather than assumed.
- Chaining many operations without intermediate checks makes it hard to see where an error arose. Inspecting intermediate outputs at key stages is recommended.
Frequently asked questions
Does Map Algebra work with vector data?
Map Algebra is defined for raster (grid) data. Vector features such as polygons or lines must first be rasterized to a grid of the desired resolution before they can take part in map algebra operations. The rasterization step introduces quantization error that analysts should document and, where possible, assess through sensitivity analysis.
How do I handle NoData values in a map algebra expression?
Most GIS platforms propagate NoData through arithmetic by default, so a cell that is NoData in any input produces NoData in the output. To change this, use the conditional or null-handling functions of your software. In ArcGIS Spatial Analyst, for example, CON and IsNull can substitute a default value or exclude a layer from the NoData mask. Check the documentation of your own environment before relying on a particular function.
What is the difference between local, focal, zonal, and global operations?
Local operations use only the value(s) at the same cell position across one or more layers. Focal operations summarise values within a moving spatial neighborhood centred on each cell. Zonal operations aggregate values for all cells belonging to the same predefined zone. Global operations consider the entire raster extent, as in least-cost distance calculations. Tomlin's four classes cover most raster spatial analysis tasks.
Related methods
Sources
Tomlin, C. D. (1990). Geographic Information Systems and Cartographic Modeling. Prentice Hall.
ISBN: 978-0-13-350927-4