What is a raster?
A raster is a grid of cells. Each cell has one value, and the grid has a known cell size and position on the Earth. Satellite images, elevation models, temperature surfaces and classified land cover maps are all rasters.
Some cells have no value, for example where a cloud hid the ground or where a layer does not reach. These hold a special NoData value. NoData is not zero. A zero is a measurement, and NoData means there is nothing to measure.
What is map algebra?
Map algebra is arithmetic and logic applied to cells. The term comes from the geographer Dana Tomlin, who grouped the operations by which cells they use.
| Family | Cells used for each output cell | Example |
|---|---|---|
| Local | The same cell in one or more rasters | NDVI from the red and near-infrared bands |
| Focal | The cell and its neighbours | A 3 by 3 smoothing filter, or slope from an elevation model |
| Zonal | All cells inside a zone, such as a polygon | The mean temperature of each park |
| Global | The whole raster | The distance from every cell to the nearest road |
Reclassification
Reclassification replaces ranges of values with class codes. It turns a continuous raster into a map you can count and compare. A vegetation index can become four classes: water and built-up, sparse, moderate and dense vegetation. The class breaks are your decision, so base them on the histogram and on a visual check against imagery, and write down why you chose them.
Combining rasters
Two ways to combine rasters appear again and again.
Boolean overlay uses tests that return 1 or 0. Cells that were dense vegetation in 2020 and are not in 2025 can be found with a test on both dates, and the result is a mask of loss.
Weighted overlay multiplies each raster by a weight and adds them. The input rasters need to be on the same scale first, such as 0 to 1, and weights usually add up to 1. The site suitability note covers this in more detail.
Zonal statistics
Zonal statistics summarise a raster inside each polygon, for example mean NDVI for each park. The tool counts a cell when its centre falls inside the polygon, so a small polygon may contain only a few cells and give an unstable mean. Look at the count column and treat polygons with very few cells carefully.
What must match
Cell-by-cell tools need rasters that line up. Before combining two rasters, check that they share:
- the same coordinate reference system
- the same cell size
- the same extent and alignment of cell edges
If they do not, resample one to match the other, ideally once and from the original data. Resampling a raster again and again blurs values.
Example: vegetation change
The QGIS tutorial calculates NDVI from Sentinel-2 imagery for March 2025 and March 2020, using the same bands and the same scale. Subtracting one from the other shows where vegetation changed. A reclassified version marks drops of 0.2 or more as loss. Comparing two dates from the same time of year keeps the seasons from creating false change.
Common mistakes
- Combining rasters that do not share a grid.
- Treating NoData as zero in an average.
- Dividing integers and getting integer results when decimals were needed.
- Choosing class breaks without looking at the histogram.
- Comparing dates from different seasons and calling the difference land change.
- Reading zonal means for tiny polygons as reliable.
Glossary
| Term | Meaning |
|---|---|
| Raster | A grid of cells, each with a value |
| NoData | The value that marks a cell with no information |
| Map algebra | Operations on raster cells, grouped as local, focal, zonal and global |
| Reclassification | Replacing value ranges with class codes |
| Zonal statistics | Summaries of a raster inside zones such as polygons |
| Resampling | Recomputing a raster onto a different grid |
Practise it
The tutorial Raster analysis: reclassify, overlay and zonal statistics runs these steps on Sentinel-2 NDVI for Bengaluru.
Test yourself
1. Why is NoData different from zero?
Zero is a real measurement. NoData means no value was recorded. Treating it as zero lowers averages and creates false results.
2. Which family of map algebra gives the mean value of a raster inside each polygon?
Zonal operations.
3. What three properties must two rasters share before you combine them?
The coordinate reference system, the cell size, and the extent and alignment of the cells.

