- Learn
- Earth & Environmental Sciences
- Introduction to GIS
- Raster and Terrain Analysis
Raster and Terrain Analysis
BeginnerLesson 7 of 7 in Introduction to GIS Course
What you will learn
- Explain how a grid of cells stores values, how cell size and extent control detail and data volume, and how vector layers become rasters for analysis.
- Explain how a raster grid stores valuesDescribe cells, rows, columns, bands, data types and NoData, and tell discrete rasters from continuous ones.
- Choose a suitable cell size and extentRelate cell size to detail, file size and detectable features, and resample and align rasters with a method that fits the data.
- Convert vector layers to rasters and backRasterize points, lines and polygons with a value field and a cell assignment rule, and turn raster regions into polygons.
- Explain how a raster grid stores values
- Combine and transform rasters with local, focal, zonal and global operations, written as raster calculator expressions or run as tools.
- Combine rasters cell by cell with local operationsWrite raster calculator expressions with arithmetic, comparisons and conditions, and predict how NoData and data types affect the result.
- Summarize neighborhoods, zones and whole rastersUse focal statistics, zonal statistics and global distance operations, and choose the operation that matches the question.
- Combine rasters cell by cell with local operations
- Estimate values between measured points with deterministic and geostatistical methods, and judge how reliable the resulting surface is.
- Estimate values with inverse distance weightingExplain why interpolation works, compute an IDW estimate by hand, and predict how the power and neighborhood settings change the surface.
- Compare interpolation methods and test their accuracyChoose among nearest neighbor, TIN, natural neighbor, spline and kriging, and evaluate a surface with cross-validation.
- Estimate values with inverse distance weighting
- Judge the quality of a DEM and calculate and interpret slope, aspect, hillshade and contours.
- Describe digital elevation models and their sourcesTell DEMs, DTMs and DSMs apart, know common sources and resolutions, and check units, datum and errors before analysis.
- Calculate slope from a DEMExplain slope as rise over run, convert between degrees and percent, and follow how software computes slope from a 3×3 window.
- Map aspect and interpret the direction a slope facesRead aspect as the compass direction a slope faces, handle flat cells and the circular scale, and group aspect into direction classes.
- Visualize terrain with hillshade and contoursCreate a hillshade from a chosen light position, use it to read and check terrain, and derive contour lines from a DEM.
- Describe digital elevation models and their sources
- Follow the standard workflow of filling sinks, tracing flow direction and accumulation, extracting streams and delineating the area that drains to an outlet.
- Prepare a DEM and compute flow directionFind and fill sinks, and give each cell its D8 flow direction toward the steepest downhill neighbor.
- Calculate flow accumulation and extract streamsInterpret flow accumulation as upstream contributing area and choose a threshold that turns it into a stream network.
- Delineate watersheds from pour pointsPlace and snap pour points onto the stream network, delineate the area draining to each and check the result.
- Prepare a DEM and compute flow direction
- Turn a siting question into criteria and constraints, put the criteria on a common scale, and combine them with Boolean or weighted overlay to rank locations.
- Define criteria and constraints and prepare the layersTranslate a siting question into factors and exclusion constraints, derive each criterion raster and put all layers on one grid.
- Standardize criteria by reclassificationReclassify each criterion to a common suitability scale, set the direction of preference, and handle class boundaries and excluded values.
- Combine criteria and evaluate the resultCombine standardized layers with Boolean or weighted overlay, apply the constraints, and test how stable the ranking is.
- Define criteria and constraints and prepare the layers
Raster and Terrain Analysis study guide
1Read and prepare raster grids
A raster map puts geographic information into cells, but its colors reveal only part of the story. Read what each stored value means, choose a cell size that fits the features being studied, and align layers before combining them. Converting between vectors and rasters brings roads, soils and protected areas into the same workflow. Each choice affects the detail, area and precision of the result.
1.1 Read the values behind a raster map
A raster divides geographic space into a rectangular grid of equal-sized cells, also called pixels. Each cell stores one value in each band. To interpret a colored map, first find out what those values mean: a measurement, a class code or a missing observation.
Locate a cell and interpret its value
Cells are arranged in rows and columns. The grid's origin, cell size and coordinate reference system place those rows and columns on the ground. A row and column identify a location because the whole grid has a fixed position. In a GeoTIFF, the georeferencing is stored with the values.
A cell value may summarize its area or represent a sample at its center; the production method tells you which. An elevation of 412.7 means about 412.7 m above the stated vertical datum. A land cover value of 4 could mean deciduous forest. The legend or attribute table supplies that meaning; the number alone does not.
| Kind of raster | What the value means | Meaningful operations |
|---|---|---|
| Discrete or categorical | A class such as forest or water | Count cells, select classes, compare categories |
| Continuous | A quantity such as elevation or temperature | Average, subtract, compare and interpolate values |
Adding forest code 4 to water code 2 produces 6, but it does not produce a useful land cover category. Codes are labels. Before combining categories in a suitability calculation, assign them meaningful scores.
Bands and data types
A band is one layer of values on the same grid. A multispectral image has bands for different wavelength ranges; a DEM usually has one elevation band. QGIS expressions name the layer and band, as in "dem@1". Selecting the wrong band can give a valid-looking calculation of the wrong quantity.
The data type controls the values a cell can store. An unsigned 8-bit integer holds 0–255; a signed 16-bit integer holds −32768–32767. A 32-bit floating-point type stores decimals. Use integer values for class codes and floating point for results such as slope or NDVI. Saving 18.59° as an integer loses its decimal part through rounding or truncation. A continuous raster can also use integer storage when its measurements are whole numbers; the meaning and storage type are separate choices.
Keep missing values separate from zero
NoData means no valid value is available. It can mark a sensor gap, a void or the area outside a study boundary. Zero is a valid measurement: 0 m can represent sea level, and 0 can mean a condition failed.
A file may reserve −9999 for NoData. That number must also be declared as NoData in the metadata. Otherwise, the software includes it as a real elevation, pulling averages downward and creating false pits. Check a layer's NoData setting before using its statistics.
In QGIS, open Layer Properties > Information to inspect dimensions, cell size, extent, data type and NoData. ArcGIS Pro lists these under Properties > Source. Use rasters for surfaces and cell-by-cell analysis, and vectors for features such as parcels or road centerlines whose boundaries and attributes matter.
Key Takeaways
- Each cell stores one value per band on a georeferenced grid.
- Class codes identify categories; continuous values represent measurable quantities.
- Choose floating-point storage when decimal results matter.
- NoData marks missing information; zero can be a valid value.
1.2 Set the grid size and line up the cells
Cell size controls how much ground one cell represents. Extent controls the rectangle covered by the grid. Together, they determine how many cells must be stored and how much detail an analysis can show.
Calculate dimensions and storage
A 30 m grid with 4000 columns and 3000 rows covers 120 km by 90 km. It contains 12 million cells. At 4 bytes per cell for 32-bit floating point, its values need 48 million bytes, about 48 MB before compression. File headers, extra bands and compression affect the actual file size.
Halving the cell side to 15 m doubles both the columns and rows. The result has 48 million cells and about 192 MB of uncompressed values. In general, halving cell size quadruples cell count for the same extent.
Cell area is the square of the cell side. A 30 m cell covers 900 m²; a class with 200 such cells covers 180000 m², or 18 ha. Keep lengths and areas distinct when converting units: one square kilometer contains one million square meters.
Match resolution to the question
A 5 m stream cannot appear as a separate, accurate strip in 30 m land cover. It may disappear or share mixed cells with neighboring land. A useful starting rule is a cell size no larger than about half the narrowest feature you need to detect. Source quality still limits what can be detected.
Resampling a 30 m DEM to 5 m creates a denser grid, but supplies no new measurements. The smoother appearance can hide the original limits. Choose a resolution that fits both the decision and the information in the inputs.
A geographic grid uses degrees. One arc-second of latitude is about 30.9 m, but one arc-second of longitude is about 21.8 m at 45° latitude and 15.4 m at 60°. A degree-based cell is therefore not a square of fixed ground dimensions. For the planar distance, area and slope work here, use a suitable projected coordinate system in meters.
Choose a resampling method
Changing cell size, projection or grid alignment requires new values at new cell locations.
| Method | How it assigns values | Suitable data |
|---|---|---|
| Nearest neighbor | Copies the closest input cell | Class codes |
| Bilinear | Weights the four nearest cells | Continuous surfaces |
| Cubic convolution | Uses 16 nearby cells | Continuous surfaces needing smoother display |
Bilinear interpolation between forest code 4 and water code 2 can produce 3, falsely labeling cropland. When making a coarser raster, aggregation can summarize all contributing cells: mean or maximum for elevation, majority for land cover.
Use one reference grid
Cell-by-cell overlay requires matching CRS, cell size and alignment. Equal cell sizes alone do not ensure that edges coincide. Set an output extent and mask too. In QGIS, use Warp (Reproject) or Align Rasters, then set the Raster Calculator output grid. In ArcGIS Pro, set Cell Size, Snap Raster, Extent and Mask. A reference grid based on the coarsest important input often avoids suggesting detail unsupported by that input.
Key Takeaways
- Halving cell size quadruples cell count over the same extent.
- Class area equals cell count multiplied by cell area.
- Finer output cells do not create finer source information.
- Use nearest neighbor for codes and continuous interpolation for measured surfaces.
- Match CRS, cell size and alignment before combining rasters.
1.3 Convert features without losing their meaning
Vector and raster layers can take part in the same analysis after conversion. Rasterization assigns feature values to cells. Polygonizing groups equal-valued cells into vector regions. Each conversion changes how boundaries are represented.
Choose the value and the assignment rule
To rasterize protected areas, assign a fixed value of 1 to included cells and use a background of 0. To rasterize soils, use an attribute such as soil_code. Confirm the output field and its meaning before running the tool: a feature's record number is not necessarily its class code.
The assignment rule decides whether a cell belongs to a feature. A center rule gives a cell the polygon value when the cell's center falls inside it. GDAL Rasterize uses this rule for polygons by default, as does ArcGIS Pro Polygon to Raster. ArcGIS also offers maximum area and maximum combined area choices.
An all touched rule includes every cell the feature touches. This keeps more narrow features visible but expands their raster footprint. Points occupy their containing cells; line rasterization marks cells along the line. The exact rule matters most near boundaries and for small features.
Recognize the change in area and shape
A cell stores one value for its entire footprint. A 6 m road represented by a 30 m strip of cells looks wider than the road. Polygon boundaries become stair-steps, and narrow parts can vanish or split. If precise setbacks or distances are needed, calculate them from the vector features or choose a finer grid supported by the source.
Suppose a 2.0 ha polygon becomes 22 cells on a 30 m grid. Each cell covers 900 m², so its raster area is 19800 m², or 1.98 ha. The difference comes from assigning whole cells at the boundary. A change to all touched can change both the count and the area without any change to the source polygon.
Group cells into polygons
Polygonizing creates polygons from connected equal-valued cells. Use QGIS Polygonize or ArcGIS Pro Raster to Polygon when reporting candidate sites or watershed regions. The initial boundary follows cell edges; simplification changes its shape.
Reclassify a continuous surface before polygonizing it. A floating-point elevation raster can contain many slightly different values, leading to a mass of tiny regions. A small set of classes, such as low, medium and high, produces regions that answer a reporting question.
Connectivity determines whether touching cells belong to one region:
- 4-connectivity: cells must share an edge.
- 8-connectivity: sharing a corner is enough.
Two suitable cells that meet only diagonally form two regions under 4-connectivity and one under 8-connectivity. Select the rule that fits what connected land means for the decision. Record it when grouping cells with Polygonize, GRASS r.clump or ArcGIS Pro Region Group, because it changes the region counts used in minimum-site-area checks.
Key Takeaways
- Rasterization needs a value and a rule for assigning cells.
- Center and all-touched rules give different boundary cells.
- Whole-cell boundaries change feature areas and narrow shapes.
- Reclassify continuous values before polygonizing regions.
- 4-connectivity joins edges; 8-connectivity also joins corners.
2Analyze the values across a grid
Raster analysis starts with deciding which input cells should contribute to each answer. Some questions compare values at one location; others summarize a moving neighborhood, a fixed region or distances across a whole grid. Expressions turn these choices into calculations and masks. Follow the values through a few cells to see how comparison signs, missing data and output storage change what the resulting map can tell you.
2.1 Build expressions that work cell by cell
Map algebra treats raster layers as variables. A local operation reads values at the same location and writes one output value there. This makes it useful for differences, unit conversions, vegetation indices and yes-or-no tests.
Work with meaningful values
Subtracting an older DEM from a newer DEM maps elevation change, provided their grids, vertical datums and units agree. A positive value means the newer surface is higher. Reversing the subtraction reverses the sign and therefore the interpretation.
QGIS names bands inside double quotes. For example, "new_dem@1" - "old_dem@1" reads band 1 from both layers. Layer names in ArcGIS Pro expressions use forms such as "new_dem" - "old_dem". The expression acts independently at every matching cell.
NDVI uses the near-infrared and red reflectance bands:
With reflectances 0.45 and 0.09, the numerator is 0.36 and the denominator is 0.54. Their quotient is about 0.67. In QGIS, write ("nir@1" - "red@1") / ("nir@1" + "red@1"). The parentheses keep the whole numerator and denominator together. Check how a zero denominator is handled when preparing a real output.
Turn conditions into masks
A comparison such as "slope@1" <= 5 gives 1 for true and 0 for false. It selects slopes at or below 5°, including exactly 5°. Multiplying two 0/1 tests performs AND: a cell gets 1 only if both tests pass. Adding tests counts how many pass; it does not enforce all of them.
For grassland code 3, the QGIS expression ("slope@1" <= 5) * ("landcover@1" = 3) selects flat grassland. At a cell with slope 3.2° and code 3, both tests give 1, and the product is 1. A 7° grassland cell gives 0. A gentle forest cell also gives 0 because the cover test fails. OR accepts a cell when at least one test passes, so it answers a different question.
A conditional chooses values explicitly. QGIS uses if("slope@1" <= 5, 1, 0); ArcGIS Pro uses Con("slope" <= 5, 1, 0). Set Null in ArcGIS Pro can turn selected cells into NoData for masking.
Preserve decimals and missing values
In most local arithmetic, NoData in an input produces NoData in the result. Adding 5 to a missing elevation cannot establish the new elevation. Gaps in any input can therefore cut holes in an overlay. Inspect the gaps and decide whether to mask, replace or fill them using a justified method.
Choose floating-point output for decimal results. Integer storage can reduce an NDVI of 0.67 to 0 or 1. ArcGIS Pro's Float can force floating-point arithmetic; in QGIS, check the calculated raster's output type. Arithmetic on class codes remains meaningless even when saved as floating point: reclassify categories into scores before adding them.
Key Takeaways
- Local operations combine values at the same grid location.
- Comparison outputs are 1 for true and 0 for false.
- Multiply binary tests for AND; add them to count passing conditions.
- NoData usually propagates through local arithmetic.
- Use floating-point output to retain decimal results.
2.2 Choose the cells that feed each statistic
Raster operations differ in the set of input cells used for an output. The key choice is whether the question concerns one location, a moving neighborhood, a named zone or a distance across the grid.
Move a focal window
A focal operation moves a window across the raster and calculates one statistic at each center. A 3×3 window contains the center cell and eight neighbors. Larger rectangles, circles and rings support other neighborhood questions.
Consider elevations arranged by rows as 50, 48, 46 / 52, 50, 47 / 55, 53, 49 m. The total is 450 m across nine values, so the center's focal mean is 50.0 m. The maximum is 55 m, the minimum 46 m and the range 9 m. Range measures local relief; mean smooths small variations. Focal majority can replace isolated class speckles with the most common neighboring class.
A larger mean window smooths more strongly and can erase small ridges or channels. Choose its ground size as well as its cell count: three 10 m cells span 30 m, while three 30 m cells span 90 m. Slope and aspect also derive from a neighborhood, though they calculate change and direction instead of a simple summary.
At an edge or next to a void, the window is incomplete. Some tools ignore missing cells; others return NoData. Process a margin beyond the final study area and clip afterward so the working boundary does not remove useful neighborhoods.
Summarize fixed zones
A zonal operation groups cells by a zone ID or a polygon. It can report mean elevation per watershed, maximum slope per parcel or forest area per district. A zone can have several separate patches with the same ID.
If a zone has elevations 10, 12 and 14 m, its mean is 12 m. A zonal table has one row for that zone; a zonal raster repeats 12 in the zone's cells. The statistic summarizes the whole zone, not a moving area around each cell.
| Question | Operation | What defines the group |
|---|---|---|
| Mean slope in each parcel | Zonal | Fixed parcel boundaries |
| Mean slope within 100 m of each cell | Focal | A moving neighborhood |
| Difference between two DEMs | Local | The same cell location |
Measure distance across the grid
A global operation can depend on cells throughout the raster. Euclidean distance assigns each cell the straight-line distance to the nearest source-cell center. A remote road cell can still determine the answer where no road occurs in the local window.
On a 30 m grid, three horizontal cell steps equal 90 m; one diagonal step is about 42.4 m. These are distances between cell centers, so rasterizing roads first limits positional precision. Use projected map units in meters.
In QGIS, use GRASS r.neighbors for focal statistics, Zonal statistics for polygon summaries and GDAL Proximity (Raster Distance) for distance. ArcGIS Pro provides Focal Statistics, Zonal Statistics as Table and distance tools. Check the output form and NoData settings along with the chosen statistic.
Key Takeaways
- Focal statistics summarize a window that moves with each output cell.
- Zonal statistics summarize fixed regions, including separate patches with one ID.
- Window size and NoData rules change focal results.
- Euclidean distance measures straight lines to source-cell centers.
3Build and evaluate continuous surfaces
Rain gauges, wells and survey points measure scattered locations, while many decisions need a value between them. Interpolation builds that continuous surface using relationships among the samples. Work through distance weighting, compare the shapes other methods can produce, and test predictions against withheld measurements. The sample pattern and the test errors help distinguish a useful surface from one that merely looks smooth.
3.1 Estimate between samples with IDW
A point layer gives measurements only where observations were made. Spatial interpolation estimates the continuous quantity between those points. Rain gauges can support a rainfall surface, and survey points can support an elevation surface.
Use distance to set influence
Interpolation relies on spatial autocorrelation: nearby observations tend to be more alike than distant ones. IDW, short for inverse distance weighting, turns this idea into a weighted mean. Nearby points receive more weight; the power controls how fast that weight falls.
Here, each sample has value and distance from the estimated location; is the power. The denominator divides by the total weight. Leaving it out gives a weighted sum in the wrong scale.
Calculate one estimate
Three gauges record 20, 30 and 50 mm at distances of 100, 200 and 400 m. With power 2, the weights are inversely proportional to the squares of those distances. Multiplying all weights by the same constant does not change the weighted mean, so use the simple ratio 16:4:1.
The nearest measurement pulls the estimate toward 20 mm. An unweighted mean would give every gauge equal influence and ignore their different distances.
With power 1, the ratios become 4:2:1 and the estimate is about 27.1 mm. With power 3, they become 64:8:1 and the estimate is about 21.5 mm. Increasing power gives the nearest points more control and can make local peaks and bull's-eye patterns stronger. Power 2 is a common software default, including QGIS and ArcGIS Pro; test it against alternatives.
Set the search neighborhood
A fixed number of nearest samples gives a search radius that expands where points are sparse. A fixed radius includes all samples inside a chosen distance and can require a minimum count. Too few points can make a patchy surface; many distant points can smooth local differences.
IDW is exact at a sample location: it returns that measurement. Elsewhere, positive weights keep the estimate within the range of the samples used. If the highest measured ground is 300 m, IDW cannot invent a 350 m summit. An isolated extreme sample often creates circular rings around itself.
Match the method to the data
Use projected coordinates for distance-based weights. Select an output cell size that fits the sampling spacing; a 1 m grid between gauges hundreds of meters apart adds a smooth-looking display, not new observations. Estimates beyond the outermost samples are extrapolations and usually become less reliable farther from the data.
Interpolate continuous point measurements. Soil class codes and district population totals do not form continuous point measurements. A value halfway between class codes has no category meaning, and an area total cannot be treated as if it were measured at one point.
Key Takeaways
- IDW uses distance-weighted averages of continuous point measurements.
- Higher power gives the nearest samples more influence.
- Divide the weighted total by the sum of the weights.
- Positive weights keep estimates inside the range of the samples used.
- Neighborhood and sample spacing limit the information in the output.
- Use projected coordinates and check extrapolated areas carefully.
3.2 Compare surfaces with independent predictions
Interpolation methods build different surfaces from the same points. Choose one that fits how the quantity varies, then test its predictions at locations where measured values are available.
Compare the construction methods
| Method | How the surface is built | Main consideration |
|---|---|---|
| Nearest neighbor | Copies the closest sample | Abrupt zones; can preserve categories |
| Linear TIN | Fits a plane inside each sample triangle | Faceted terrain; supports breaklines |
| Natural neighbor | Weights neighbors through Voronoi areas | Smooth, bounded estimates inside the samples |
| Spline | Bends a smooth surface through samples | Can overshoot the sample range |
| Kriging | Fits a statistical model of spatial dependence | Produces predictions and standard errors |
A TIN, or triangulated irregular network, connects sample points into triangles. Linear interpolation within each triangle honors its three corner heights. Supplied breaklines force triangle edges to follow features such as ridges or streams. Without them, triangles can cut across a ridge. QGIS also offers a smoother Clough-Tocher version.
Natural neighbor weights depend on how much of existing Voronoi regions a new point would take. It stays within the sample range and does not predict beyond the outermost samples. A spline can rise above the highest sample or below the lowest, especially where nearby measurements differ sharply. A smooth map is therefore not enough evidence of a realistic surface.
Understand what kriging adds
Deterministic methods use a fixed geometric or smoothing rule. Kriging first examines pairs of samples. A semivariogram summarizes how differences between their values change with separation distance. A fitted model sets prediction weights and supports a standard error surface.
The error surface identifies less certain predictions under the fitted model. It depends on the model and the sample pattern; it is not a direct measurement of the actual error at an unsampled point. Kriging needs enough well-spread points to estimate spatial dependence sensibly.
Test predictions without giving away the answer
In leave-one-out cross-validation, remove one sample, predict its location from the others, and subtract the measured value from the prediction. Repeat for every sample. Testing an exact interpolator at points it used would merely recover the input values.
Errors of 2, −1, 3, −2 and 0 mm have a mean of 0.4 mm. The root mean square error is:
Mean error indicates bias; positive and negative errors can cancel. Squaring errors before averaging prevents that cancellation, so RMSE shows their typical size. A separate withheld test set can also compare predictions with observations.
Compare settings on the same test samples and units. Prefer lower error alongside physically plausible shapes. Dense clusters can leave large unsampled gaps; missing high-ground samples leave peaks poorly constrained. Record the method, settings and validation results, and display the sample locations with the surface.
Key Takeaways
- Choose interpolation by the surface behavior and available samples.
- Breaklines let TIN triangles preserve sharp terrain changes.
- Spline can overshoot; IDW and natural neighbor remain bounded by their samples.
- Kriging models spatial dependence and estimates prediction uncertainty.
- Withhold each test observation before predicting it.
- Mean error measures bias; RMSE measures error size without sign cancellation.
4Derive and read terrain
An elevation grid becomes useful terrain information only after its surface type, height reference, units and errors are understood. From a checked DEM, calculate steepness and downhill direction, then use light and contour lines to see the landforms. These views answer different questions about the same ground. Their values also respond to cell size, noise and tool settings, so interpretation begins with the underlying elevation data.
4.1 Check what an elevation model measures
An elevation raster stores the height of a surface above a vertical datum, the reference used for heights. Before deriving terrain, check which surface was measured, how it was made and whether its units and accuracy fit the question.
Distinguish ground from objects
A digital terrain model (DTM) represents bare ground. A digital surface model (DSM) includes trees, roofs and other objects. Digital elevation model (DEM) is a general term, though many agencies use it specifically for bare ground. Read the metadata to establish the file's meaning.
If a DSM cell is 135.0 m and the matching DTM cell is 112.5 m, subtracting them gives an object height of 22.5 m. The grids, units and datums must agree for that difference to represent object height. A roof mistaken for terrain can create a false steep edge or divert modeled drainage.
Know the main sources
Airborne lidar records laser returns as a point cloud. Ground classification can separate ground returns from vegetation, supporting terrain grids of 1 m or finer. Photogrammetry estimates surfaces from overlapping images. Radar interferometry measures surface height from radar observations.
SRTM used radar observations collected in 2000 and provides 1 arc-second data, roughly 30 m, between 60° N and 56° S. The global Copernicus 30 m DEM is a surface model. National lidar programs, including USGS 3DEP, provide other elevation products. Older grids may have been interpolated from contour lines, leaving terrace-like steps.
A smaller cell is not an accuracy guarantee. Check the source date, surface type, resolution and reported vertical error. A recent fine DSM and an older coarse DTM differ in more than cell size.
Put heights and horizontal distances in compatible units
A geoid-based height and an ellipsoidal height can differ by tens of meters at the same place. Align vertical datums before combining elevation layers. Reprojection of the horizontal grid alone does not establish that their height references agree.
For planar terrain calculations, horizontal and vertical distances must use compatible units. If elevations are in feet and cell size is in meters, a z-factor of 0.3048 converts the heights to meters. This conversion is different from vertical exaggeration, which changes the displayed or calculated relief deliberately.
For a grid in degrees, reproject to a suitable projected CRS in meters or select a terrain method that correctly handles geographic coordinates. Degree-sized horizontal steps and meter heights cannot be compared as if they shared a unit. Some tools infer unit scaling from metadata, so inspect their settings and metadata instead of assuming a conversion happened.
Inspect before processing
Use the identify tool to check heights and compare minimum and maximum values with known terrain. View a hillshade for stripes, tile seams, pits, spikes and terraces. Draw a profile across a valley to see unexpected jumps. Vertical accuracy is often reported as an RMSE in meters, and errors pass into slope and flow paths.
Choose resolution for the terrain feature being studied. Coarse cells usually smooth steep slopes and miss small channels. Keep a margin beyond the study area for neighborhood calculations and the full upstream extent for drainage work.
Key Takeaways
- Check whether the raster represents bare ground or the tops of objects.
- DSM minus a compatible DTM estimates object height.
- Match vertical datums as well as horizontal grids.
- Use compatible horizontal and vertical units for planar terrain calculations.
- Inspect metadata, profiles and hillshade for errors before analysis.
4.2 Calculate steepness in degrees and percent
Slope is the greatest rate of elevation change at a location. It can be expressed as an angle in degrees or as percent rise. These describe the same steepness on different scales, so every slope map needs a unit in its legend.
Convert rise and horizontal run
Percent rise uses horizontal distance, not the distance along the sloping surface:
A rise of 12 m across 80 m horizontally gives 15%. Convert between percent and angle with:
For 15%, the angle is about 8.5°. A 45° slope is 100%, while 60° is about 173%. Percent slope can exceed 100%; it does not stop at vertical in the way a 0–100 percentage share does. A 10% slope is about 5.7°, not 10°.
Read the 3×3 elevation window
A terrain tool estimates local east–west and north–south changes. Horn's method labels a window as follows, with the center at e:
| a | b | c |
|---|---|---|
| d | e | f |
| g | h | i |
For cell side length , calculate:
Then combine the two rates:
The four side neighbors receive double weight; the center elevation does not appear. The rates describe change along two axes, while their combined magnitude gives the steepest change.
Work through one window
For 10 m cells, use rows 50, 48, 46 / 52, 50, 47 / 55, 53, 49 m. The right weighted column totals 189; the left totals 209. Their difference divided by 80 gives an east–west rate of −0.25. The bottom weighted row totals 210 and the top 192, giving a north–south rate of 0.225.
Squaring and adding gives 0.113125. Its square root is about 0.336. The angle is about 18.6°, and percent rise is about 33.6%. Signs show the direction of change, but both squared terms contribute positively to steepness.
Choose settings and interpret the result
In QGIS, use GDAL Slope or the native terrain Slope tool; ArcGIS Pro provides Slope and Surface Parameters. Choose degrees or percent explicitly. Use compatible elevation and horizontal units, converting input feet with a z-factor of 0.3048 when the grid is in meters. A geographic grid needs reprojection or a correctly configured geographic method.
Slope is a continuous surface. Classify it into useful ranges for access, construction or erosion questions. A pit or spike creates steep neighboring cells; a coarse DEM usually smooths the same hill. Compare slope results using DEMs of similar resolution, and inspect isolated rings of high values before treating them as real terrain.
Key Takeaways
- Percent rise uses rise divided by horizontal run, multiplied by 100.
- Degrees and percent are linked by tangent, not a fixed multiplier.
- A 45° slope is 100%; steeper slopes exceed 100%.
- Horn slope combines two weighted rates from a 3×3 window.
- Match units and label the output slope unit.
- Resolution and DEM errors affect the calculated steepness.
4.3 Read aspect as a compass direction
Aspect tells you which direction a slope faces: the direction of steepest descent. It does not tell you how steep the ground is. A steep and a gentle slope can both have an aspect of 180°.
Follow the downhill compass bearing
Aspect is measured clockwise from north: 0° or 360° is north, 90° east, 180° south and 270° west. An aspect of 180° means the ground falls southward. Reading it as the uphill direction reverses the terrain interpretation.
The same local elevation rates used for slope also determine aspect. In the 10 m window with rows 50, 48, 46 / 52, 50, 47 / 55, 53, 49 m, the east–west rate is −0.25. Heights fall eastward. The rate toward the bottom of the grid is 0.225, so heights rise southward and fall northward. Together these give a northeast-facing slope, about 48° in compass degrees.
Use the rate signs or neighboring heights as a quick check on software output. An answer pointing southwest would conflict with the lower ground to the northeast. Keep track of the software's axis directions when converting an angle to a compass bearing.
Handle flat and nearly flat cells
A perfectly flat cell has no downhill direction. ArcGIS Pro represents flat aspect as −1. GDAL Aspect returns NoData, normally −9999, unless its zero-for-flat option is selected. Zero can also represent north, so a separate flat class prevents confusion.
On nearly level ground, a tiny height error can change the calculated direction sharply. Aspect maps can therefore look speckled even when the slope map is almost flat. A small slope cutoff, such as 2°, can separate ground where aspect is useful from ground where its direction is unstable.
Respect the wrap at north
Aspect is circular. Bearings of 359° and 1° differ by 2°, because north lies between them. Their ordinary arithmetic mean is 180°, which points the opposite way. For directional summaries, convert to northness and eastness, using cosine and sine of the aspect, or use direction classes.
Eight common classes are 45° wide: north, northeast, east, southeast, south, southwest, west and northwest. North crosses the end of the numeric scale, covering 337.5° through 360° and 0° through 22.5°. A numeric reclassification therefore needs two north ranges. Assign boundary values to exactly one class so they are not duplicated.
Connect aspect to sunlight
Equator-facing slopes generally receive more sun: south-facing in the Northern Hemisphere and north-facing in the Southern Hemisphere. Aspect affects snowmelt, soil moisture, vegetation and solar siting. Its influence is weak on nearly flat ground and stronger as a slope becomes more pronounced.
Do not score raw bearings as if a larger number always meant a better direction. For a solar model, score compass classes or use a circular transformation toward the preferred bearing. Handle flat cells independently, since they have no aspect to score.
Key Takeaways
- Aspect is the downhill direction, clockwise from north.
- Slope measures steepness; aspect measures direction.
- Keep flat cells separate from north-facing ground.
- North wraps around 0°/360°, so ordinary means can be misleading.
- Sun-facing preferences reverse between hemispheres.
4.4 Show relief with light and contour lines
A DEM is easier to read when its elevations become shaded relief or contour lines. Hillshade shows how terrain faces a chosen light. Contours connect equal heights. Both help reveal landforms and errors that can be hard to see in a color ramp alone.
Set a light position
Light azimuth is the compass direction it comes from; altitude is its angle above the horizon. GDAL Hillshade in QGIS and ArcGIS Pro commonly use azimuth 315° and altitude 45°. This northwest light matches the upper-left illumination many viewers expect. QGIS's native terrain tools can use different defaults, so read the actual settings.
Light from the southeast can make ridges look like valleys, an effect called relief inversion. Compare the DEM values or contours if a shaded valley appears to stand above its surroundings. Darkness alone cannot tell you whether a cell is low or steep: it depends on its orientation to the light.
Understand the brightness calculation
For zenith angle , slope , light azimuth and aspect , the basic calculation is:
The zenith angle is 90° minus the light altitude. Negative results are set to zero. Use consistent angular units when calculating. Flat terrain under a 45° light has brightness about 180, since the aspect-dependent term vanishes.
For an 18.6° slope under the default northwest light, a northwest-facing cell has brightness about 228. The northeast-facing example at about 48° has brightness about 168, and a southeast-facing cell about 113. The surface height can remain unchanged while the illumination settings change its displayed brightness.
The grayscale commonly spans 0–255. A black cell in a basic hillshade represents no illumination from that light direction; it need not be a cast shadow from a distant mountain. A shadow option adds obstruction by other terrain. Multidirectional hillshade combines lights to retain detail on slopes facing away from a single source.
Use hillshade for display and inspection
Place hillshade beneath a partly transparent elevation or land cover layer, for example at 50% transparency. Tile seams, stripes, pits and terrace patterns become easier to spot. A z-factor greater than 1 exaggerates relief, which can help in flat terrain but changes how steep it appears.
Hillshade brightness serves display. It does not measure total sunlight received over a day or season; solar radiation tools address that different question.
Choose a contour interval
A contour joins equal elevations. An interval of 10 m from a base of 0 m produces lines at 0, 10, 20 m and onward. Close spacing shows steep ground; wide spacing shows gentle ground. Across a valley, contour V shapes point upstream toward higher ground.
Too small an interval clutters rough terrain. Noise produces jagged lines, and a focal mean can smooth the DEM before contouring, while also removing some detail. Use QGIS GDAL Contour or ArcGIS Pro Contour, set the interval and base, and label the elevation unit.
Key Takeaways
- Hillshade depends on slope, aspect and the selected light position.
- Northwest light commonly uses azimuth 315° and altitude 45°.
- Basic hillshade darkness and cast terrain shadows are different effects.
- Contours join equal heights; close lines indicate steep ground.
- Choose contour intervals that show useful relief without clutter.
5Trace drainage from terrain to outlet
Water follows connected downhill routes, linking individual terrain cells into channels and drainage areas. Prepare the DEM, choose each flow direction, count upstream contributions and extract a stream network. An outlet placed on that network anchors the watershed you want to delineate. Checking the route, the cell-count convention and the full upstream coverage makes the resulting boundary useful for environmental analysis.
5.1 Prepare drainage and choose each downhill step
A watershed is the land draining to an outlet, bounded by ridges called drainage divides. Raster drainage starts by preparing the DEM, then tracing where each cell sends flow. Those directions feed accumulation, streams and watershed boundaries.
Inspect and fill sinks
A sink is a cell or group of cells with no downhill exit. Some are DEM artifacts caused by rounding, interpolation or barriers such as road embankments. Others are real closed depressions, including quarries, karst sinkholes and lake basins.
Filling raises a depression to its spill elevation. A 98 m pit with a lowest outlet at 101 m rises to 101 m. Larger depressions may need a path to a more distant spill point; their fill depth cannot be found from one neighboring cell alone. Compare the filled and original DEM by subtraction to locate changed areas and their depths.
Use a fill limit when appropriate to retain deep, real depressions. If a road blocks a culvert omitted from the DEM, verified drainage paths can be burned into the surface by lowering the cells along them. These changes should reflect the drainage being modeled.
In QGIS, providers offer tools such as SAGA Fill sinks (Wang & Liu) and GRASS r.fill.dir; ArcGIS Pro provides Fill. Filling can create flat areas at spill level. Direction tools need a rule that routes those flats toward their outlets.
Compare downhill rates, not just heights
D8 sends a cell's entire flow to one of its eight neighbors. Choose the greatest elevation drop divided by center-to-center distance. Direct neighbors are one cell side away; diagonal neighbors are a cell side multiplied by the square root of two away.
For a 100 m center on a 10 m grid, consider east at 96 m, southeast at 93 m and south at 95 m. The other neighbors are higher.
| Neighbor | Drop in height | Distance | Drop per distance |
|---|---|---|---|
| East | 4 m | 10 m | 0.40 |
| Southeast | 7 m | About 14.14 m | About 0.495 |
| South | 5 m | 10 m | 0.50 |
Flow goes south. The southeast neighbor is lower, but reaching it requires a longer horizontal step. Comparing height drops alone would choose the wrong route.
Interpret the direction raster
ArcGIS Pro's D8 codes run clockwise from east: E 1, SE 2, S 4, SW 8, W 16, NW 32, N 64 and NE 128. The example therefore receives 4. These are direction labels, not amounts of water. Other tools use different codes; TauDEM uses 1–8 counterclockwise from east.
D8 concentrates flow into single paths. Multiple flow direction methods spread it among downhill neighbors, which can represent open hillslopes better. GRASS r.watershed defaults to multiple flow directions; switch on -s for the single-flow workflow. Keep its outputs with compatible GRASS tools, since its drainage codes differ from ArcGIS codes. Inspect unresolved sinks or looping directions before using them for accumulation.
Key Takeaways
- Fill raises sinks to their spill elevations; inspect which depressions are real.
- D8 selects the greatest height drop divided by horizontal distance.
- Diagonal neighbors are farther away than edge neighbors.
- Direction codes vary among tools and do not measure water quantity.
- GRASS r.watershed needs the -s option for single flow direction.
- Flow directions underpin accumulation, stream extraction and watershed tracing.
5.2 Turn accumulated flow paths into streams
Flow accumulation follows the direction raster and counts how many upstream cells contribute to each location. Small values lie near divides; high values form branching paths along valleys and toward the main outlets.
Check what is counted
In unweighted ArcGIS Pro accumulation, a cell does not count itself. A ridge cell with no upstream contributors has 0. GRASS r.watershed with -s includes the current cell, so the smallest count is 1. Its default multiple-flow method can split contributions and produce fractional values. Negative accumulation values flag locations that may receive flow from outside the region.
Keep the convention attached to any count-to-area calculation. For 30 m cells, each cell covers 900 m². An ArcGIS accumulation of 25000 represents 22.5 km² of upstream cells. Adding the current cell gives a full contributing footprint of 25001 cells. With self-inclusive accumulation, do not add it a second time.
A weight raster changes the quantity being summed. For example, weights can represent a rainfall contribution at each cell. Without weights, accumulation is a count standing for area. It does not give water volume or discharge; those require additional quantities and hydrological modeling.
Choose an area threshold
To extract a modeled stream network, keep cells whose accumulation exceeds a threshold. Set the desired contributing area first, then divide by cell area. For a 1 km² threshold at 30 m, the equivalent count is about 1111 cells; at 10 m, it is 10000 cells.
An ArcGIS expression such as Con("flowacc" > 1111, 1) writes stream cells and leaves other cells NoData. QGIS can use if("flowacc@1" > 1111, 1, 0) to make a 1/0 stream mask. Choose a boundary comparison deliberately: > excludes equality, while >= includes it. Account for whether the accumulation includes the current cell when a precise area boundary matters.
A low threshold includes small tributaries and produces a dense network. Raising it removes headwater branches. Compare the modeled network with mapped channels, imagery and field evidence; climate, soil and geology influence where real channels begin. Culverts and storm drains can carry water along routes absent from a surface DEM.
Display and rank the network
Accumulation values span a wide range. A logarithmic or strongly stretched color display reveals smaller branches that a linear ramp can hide. The display changes visibility, not the underlying counts used in calculations.
Strahler order starts headwater segments at 1. Equal orders joining increase the order by one; unequal orders joining keep the larger order. A first-order tributary joining a third-order channel leaves order 3. Shreve magnitude adds the incoming magnitudes at each junction.
ArcGIS Pro provides Stream Order and Stream to Feature. QGIS providers include stream ordering tools and GRASS r.to.vect for converting a stream raster to lines. Record the flow method and threshold with the exported network so another analyst can reproduce its density and contributing areas.
Key Takeaways
- Accumulation counts upstream contributions along the direction paths.
- ArcGIS excludes the current cell; GRASS single-flow accumulation includes it.
- Convert a stream-area threshold to cells using cell area.
- A higher threshold produces a sparser stream network.
- Strahler increases only where equal orders join; Shreve adds incoming magnitudes.
5.3 Trace the land draining to an outlet
A pour point identifies the outlet whose drainage area you need. It might be a gauge, intake, dam or sampling location. Its position determines which upstream land is included.
Place the outlet on the channel
A map or GPS point can fall beside the modeled stream. If the point lands on a hillslope cell, tracing upstream may return a tiny area instead of the intended basin. Snapping moves it to a high-accumulation cell within a search distance.
For a 30 m grid, a 60 m search distance spans two cell widths. Inspect the resulting point against the intended channel. Too small a search may miss it; too large a search can jump across a divide or onto a larger neighboring stream. The highest accumulation in a wide search is not necessarily the outlet you meant to select.
ArcGIS Pro provides Snap Pour Point. In a QGIS workflow, prepare the outlet on the checked accumulation and drainage layers before using GRASS r.water.outlet for a single outlet coordinate. Use matching flow-direction conventions throughout.
Delineate with directions
The watershed calculation uses direction paths, not distance from the stream. A nearby cell across a ridge can drain elsewhere, while a distant hill cell can belong to the same watershed. A buffer around a stream therefore cannot replace a drainage boundary.
Give multiple outlets distinct IDs. In a single watershed labeling from nested pour points, a cell receives the ID of the first selected outlet reached downstream. The lower outlet's region then represents the extra area between it and the upper outlet. To obtain each complete overlapping upstream catchment, delineate the outlets separately. A basin tool instead finds drainage areas to edges or sinks without selected pour points.
Check the area and boundary
Watershed area is its included cell count multiplied by cell area. An isolated ArcGIS pour point with accumulation 25000 has 25000 upstream cells plus its own cell. On a 30 m grid, the total is 22500900 m², about 22.50 km². For nested incremental regions, the lower point's full accumulation also includes the upstream region, so it will exceed that lower region's own cell count.
Polygonize the watershed and inspect its edge over hillshade and contours. Drainage divides should follow ridges, and the channel should leave at the outlet. An incremental region also has a channel entry from the upstream outlet.
Check that the DEM contains the full upstream terrain. A boundary that follows the dataset edge can signal truncation; inspect what lies beyond it and extend the DEM when contributing land is missing. Internal NoData gaps also interrupt flow paths and can leave unexpected holes.
Use the watershed as an analysis zone
The boundary can define the area for mean slope, forest-cover share or land use above an intake. Zonal statistics summarize those layers within it. Keep the original DEM, processing settings, outlet location and area checks with the result. Watershed delineation establishes drainage boundaries and areas; rainfall, soil and channel data are needed to estimate runoff or flood levels.
Key Takeaways
- Snap the outlet to the intended modeled channel and inspect the move.
- A watershed follows drainage directions and ridge divides.
- Nested outlet labels can represent incremental drainage areas.
- Count the outlet cell when converting self-exclusive accumulation to total area.
- Check boundaries, upstream coverage and internal NoData gaps.
6Build a defensible suitability model
A siting decision combines hard limits with preferences about terrain, access and land cover. Translate that decision into aligned raster layers, put the factor preferences on a common scale, and combine them into scores. Constraints decide where a site is allowed; weights decide how allowed locations trade off against one another. Connected area checks and sensitivity runs show which candidate sites remain useful when model choices change.
6.1 Turn a siting question into raster criteria
A suitability model evaluates where a proposed use fits best. It turns a siting question into mapped conditions, then combines those conditions across a common grid. Start by making the decision clear enough that every layer has a purpose.
Separate hard limits from preferences
A constraint excludes a location completely. A factor expresses how strongly it is preferred. A protected area can be an exclusion, while proximity to a power line can increase preference by reducing connection distance.
For a solar-farm example, exclude water, protected areas, cells within 200 m of homes and slopes over 10°. Among allowed cells, favor gentler slopes, shorter power-line distances and suitable land cover. Equator-facing aspect can also be a factor: south in the Northern Hemisphere and north in the Southern Hemisphere. These example limits define one model; real project limits come from its decision sources.
Do not let a strong factor compensate for a hard exclusion. A legally unavailable parcel remains excluded even if it has ideal slope and access. This distinction affects how the final rasters must be combined.
Build a layer for each question
| Decision question | Input or derived raster |
|---|---|
| How steep is the ground? | Slope from a DEM |
| Which direction does it face? | Aspect, with flat cells separate |
| How far is the nearest power line? | Distance from line features or source cells |
| Is the land protected? | Rasterized protection polygons |
| Which cover is present? | A classified land cover raster |
A binary constraint mask uses 1 for allowed and 0 for excluded. Ensure the background actually means allowed land: an unknown protection status is not the same as confirmed absence of protection.
Prepare one analysis grid
Use the same suitable projected CRS, cell size, extent and alignment for every input. A 10 m or 30 m grid can fit a site of several hectares, depending on source quality and the decision. Choose a reference grid deliberately and resample measured surfaces and categorical layers with suitable methods.
Inspect NoData in every criterion. An unknown cell should remain distinguishable from an excluded cell. Mask to the study boundary after ensuring that any distance or terrain calculation has the surrounding data it needs. A road just outside the reporting boundary can still be the nearest road inside it.
Make the model traceable
For each criterion, record its meaning, unit, direction of preference, threshold or score rule, and source. Use relevant regulations, technical guidance, expert knowledge or stakeholder requirements. Record layer dates and accuracy as well; detailed output cannot repair outdated inputs.
Check whether factors measure the same underlying influence. Distance to roads and distance to towns may be closely related where roads connect towns. Giving both large weights can count accessibility twice. Reconsider their roles or reduce their combined influence.
Build the sequence in QGIS Model Designer or ArcGIS Pro ModelBuilder. A saved workflow lets you rerun the analysis when a layer, threshold or weight changes and identify which decision caused a result to change.
Key Takeaways
- Constraints exclude cells; factors express degrees of preference.
- Translate each decision criterion into a relevant raster.
- Use one aligned grid and preserve the difference between unknown and excluded.
- Document each criterion, source, layer date and scoring choice.
- Check correlated factors to avoid counting one influence twice.
6.2 Put different criteria on the same score scale
Slope, distance and land cover have different units and meanings. Before adding their preferences, standardize them onto one suitability scale. A common choice is 1–9, with 9 best; 1–5 and 0–1 scales are also used.
Reclassify ranges and categories
Reclassification assigns a new value to each input class or numeric range. For slope, a model can use 0–2° → 9, 2–4° → 7, 4–6° → 5, 6–8° → 3 and 8–10° → 1, excluding slopes above 10°. Define each boundary explicitly. With lower bounds excluded and upper bounds included, exactly 4° belongs to the 2–4° class and scores 7; include zero deliberately in the first class.
A 4.7° cell scores 5. The class records a preference, not a new slope measurement. For land cover, score each category directly: grassland 9, cropland 7, shrubland 5 and forest 2, with water, wetlands and built-up cells excluded. The original numeric code has no order of suitability.
In QGIS use Reclassify by table; in ArcGIS Pro use Reclassify. Check the range-boundary option. QGIS's default is minimum excluded and maximum included. It can retain unmatched input values unless configured to output NoData, so a gap in the table can pass a raw value into a supposed 1–9 score raster.
Set the direction of preference
For distance to a power line, shorter distance is preferred in this model. Assign high scores nearby: 0–500 m → 9, 500–1000 m → 7, 1000–2000 m → 5, 2000–5000 m → 3 and over 5000 m → 1. Define nonoverlapping endpoints, including zero, as for slope.
A larger raw value need not mean better suitability. For another decision, such as distance from a disturbance source, longer distance could be preferred. State the desired direction before writing the score table and test cells at both ends of the range.
Rescale continuously when steps are unhelpful
A linear distance score avoids sudden class jumps:
For distances from 0 to 5000 m, this gives 9 at zero and 1 at 5000 m. At 1250 m, the remaining fraction is 0.75, giving a score of 7. Handle values outside that range deliberately so they do not create unintended scores below 1. QGIS Raster Calculator can apply the formula; ArcGIS Pro offers Rescale by Function.
Score aspect on a circle
Raw aspect degrees cannot be ranked linearly, because 359° and 1° both face almost north. Use direction classes, or a circular score toward the preferred direction. For south-facing preference:
This gives south 9, east and west 5, and north 1. Use degree-aware calculations or convert the angle if a calculator expects radians. In the Southern Hemisphere, use north as the preferred direction. Give flat cells a separate score because they have no aspect.
Key Takeaways
- Standardize factor preferences before combining different units.
- Specify whether high or low raw values deserve the higher score.
- Give every range boundary exactly one home and handle unmatched values.
- Continuous rescaling avoids jumps at class boundaries.
- Aspect needs circular scoring or direction classes, with flats separate.
6.3 Rank allowed sites and test the ranking
Overlay combines prepared criteria into a decision map. Boolean overlay answers whether all requirements pass. Weighted overlay ranks cells by preferences. After either method, check that candidate sites have enough connected area and that the result survives reasonable changes to the model.
Combine binary tests
A Boolean overlay uses 1 for a passing condition and 0 for a failing one. Multiplying the layers performs AND: only cells passing every test receive 1. This is transparent, but it treats every passing cell alike and makes a sharp distinction at a threshold. With a 10° maximum, a cell at 10.1° fails even if it meets all other tests.
Calculate a weighted score
A weighted linear combination multiplies each standardized factor by its weight, then adds the products. Use weights totaling 1, or 100%, when interpreting the result on the original score scale.
With slope, power-line distance and land cover weights of 0.5, 0.3 and 0.2, cell A scores 7, 9 and 3:
Cell B scores 9, 3 and 9, giving 7.2. Cell B wins because its slope and cover gains outweigh its weaker distance score. This compensation is useful for preferences but unsuitable for hard limits. Apply a constraint mask after scoring, keeping excluded cells identifiable as 0 on a positive score scale.
QGIS Raster Calculator applies the weighted formula directly. ArcGIS Pro Weighted Overlay uses integer inputs, influences totaling 100% and integer output; rounding both examples to 7 hides their difference. Weighted Sum supports decimal values and weights without enforcing a total. A Restricted class is one below the scale minimum; NoData remains unknown and propagates from missing inputs.
Choose and interpret weights
Weights express priorities from stakeholders, experts or policy. AHP, the analytic hierarchy process, derives weights from pairwise importance judgments and checks their consistency. Weight choice changes which trade-offs are favored.
Scores rank cells within the chosen model. A score of 8 is higher than 4, but it is not a probability or evidence of being twice as suitable. Present score classes or candidate regions with the model's assumptions and input quality.
Require connected land
Threshold the score into a binary candidate mask, group connected candidate cells, then count each region. At 30 m, a 5 ha minimum needs at least 56 cells: 55 cells cover only 49500 m², while 56 cover 50400 m². Choose 4- or 8-connectivity to match the site requirement, then polygonize the retained regions.
Use GRASS r.clump or ArcGIS Pro Region Group for region IDs. Sieve changes small regions to neighboring values; it can fill unsuitable holes and alter the eligible area, so it cannot replace a simple region-area filter.
Test sensitivity and check on the ground
Change weights or thresholds and compare which sites remain near the top. A site that wins only under one narrow weighting is less stable than one that ranks highly across reasonable runs. Check candidate boundaries and conditions with imagery, field visits or known sites before using the ranking for a decision.
Key Takeaways
- Boolean AND selects cells that pass every condition.
- Weighted scores permit trade-offs among standardized factors.
- Apply hard constraints separately so a high factor score cannot offset exclusion.
- Score meaning depends on the model; it is not a probability.
- Filter connected candidate regions by minimum area.
- Change weights and thresholds to test ranking stability.
- Check promising sites against imagery, field evidence and input quality.
Raster and Terrain Analysis examples
1Prepare a grid for a wetland survey
12 steps
- 1IntroductionStart with the survey area
A wetland survey combines elevation, land cover and protection boundaries. Every cell must refer to the same ground location before these layers can be compared. Start by checking what the stored values mean, including which cells are NoData, then choose the analysis grid, matching cell size and alignment, and convert the vector boundary onto it, which is called to rasterize it. Skipped checks quietly distort the results. The final map will inherit these preparation choices.
- 2ExplanationRead a value before reading a color
The elevation layer stores measured heights, while the cover layer stores category codes. In the cover legend, code 6 means wetland. That number is a label; doubling it does not mean twice as much wetland. Check the band and data type as well as the legend so the quantity used in an expression is the one you intend.
- 3ExampleFind the missing cells
The DEM contains heights near 150 m and a small group of cells stored as −9999. Metadata identifies −9999 as NoData, so the group is a void. A separate cell at 0 m remains a valid height. If the NoData declaration were lost, the void would become a false deep pit and distort statistics.
- 4ChallengeChoose a useful cover calculation
The survey asks how much wetland is present. Should you average the land cover codes or count cells labeled 6? Explain your choice.
---reveal---
Count cells labeled 6, then multiply by cell area. The codes identify classes and cannot be averaged to measure wetland quantity. The count becomes an area only after the grid’s ground cell area is known.
- 5ExampleSize the output grid
The survey rectangle is 60 km wide and 40 km high. A proposed 20 m grid has 3000 columns and 2000 rows. Multiply those dimensions to obtain 6 million cells. With one 32-bit floating-point band at 4 bytes per cell, the values need about 24 MB before compression. Extra bands would add their own stored values.
- 6Key InsightSee the cost of finer cells
Changing from 20 m to 10 m doubles both dimensions of the same rectangle. The count rises from 6 million to 24 million cells, and one floating-point band needs about 96 MB before compression. This larger output carries more cells, but resampling alone cannot reveal wetland boundaries absent from the original observations.
- 7TipAlign with a reference
Use a suitable projected CRS in meters and a chosen reference grid. Match cell size and alignment, then set the output extent and mask. Use nearest neighbor for the cover codes and bilinear for a continuous elevation surface. Equal cell size is insufficient if one grid starts half a cell away from the other.
- 8ChallengeChoose the honest preparation
The available land cover was measured at 20 m. Someone resamples it to 2 m and claims narrow channels are now mapped more accurately. What is wrong with that claim?
---reveal---
The new grid estimates more cells from the same source. It does not add channel observations or recover boundaries the 20 m data missed. Finer source measurements are needed to support that claimed detail.
- 9ExplanationPut protection on the grid
Rasterize the protection polygons with a fixed value of 1 and a background of 0. A center assignment includes a cell when its center lies inside the polygon; all touched includes every cell touched by it. Choose the rule deliberately, since the boundary cells change the represented protected area.
- 10ExampleKeep region connections explicit
After analysis, the survey may report connected wetland regions as polygons. Two wetland cells meeting only at a corner remain separate with 4-connectivity and join with 8-connectivity. Select the rule that matches the reporting purpose, group the cells and polygonize their class values. The initial vector edges follow the raster cells.
- 11ChallengeExplain a changed reported area
The same protection polygon covers 31 cells under a center rule and 39 under all touched on the 20 m reference grid. Why do the reported areas differ?
---reveal---
Each cell is 400 m², so the areas are 12400 m² and 15600 m². All touched includes additional boundary cells; the source polygon has not changed. This is an effect of whole-cell assignment, not evidence of a changed protected boundary.
- 12RecapCheck the prepared inputs
Before calculation, identify the quantity in each band, confirm NoData and storage type, and verify the grid position. Cell size sets both detail and cell area. Conversion rules then decide which features occupy those cells. These checks explain why a usable overlay begins with metadata and grid settings, even when the input maps look aligned.
2Choose a calculation for a habitat question
10 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionDecide what each answer needs
- 2ExampleMake the first binary test
- 3ExampleRequire the second condition
- 4TipKeep unknown cells visible
- 5ChallengeRead the sum and the product
- 6ExplanationMove a neighborhood across terrain
- 7ExampleChange from neighborhoods to zones
- 8ConnectionFind distance beyond a window
- 9ChallengePlan the two habitat summaries
- 10RecapMatch the question to the input group
3Build an estimate and test it fairly
11 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionTurn observations into predictions
- 2ExplanationGive nearer points more influence
- 3ExampleSimplify the weight ratios
- 4ExampleNormalize the weighted total
- 5ChallengePredict a power change
- 6ExplanationChoose the surface behavior
- 7Key InsightAsk what an uncertainty surface means
- 8ExampleWithhold before predicting
- 9ExampleSeparate bias from error size
- 10ChallengeJudge a polished map
- 11RecapKeep estimates tied to evidence
4Read a small hill from its elevation grid
16 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionBuild several views of one surface
- 2ExplanationChoose ground or object tops
- 3ExampleCheck a height difference
- 4ChallengeDiagnose a false change
- 5ExplanationDistinguish degrees from percent
- 6ExampleRead the weighted neighbors
- 7ExampleCombine the two rates
- 8ChallengeCheck a threshold unit
- 9ExampleInfer the downhill quadrant
- 10Key InsightCross north without crossing the landscape
- 11ChallengeRead north and flats separately
- 12ExplanationIlluminate without changing the hill
- 13ExampleRead lines of equal height
- 14TipUse shade to inspect data quality
- 15ChallengeResolve an apparent ridge
- 16RecapUse terrain products for their own questions
5Delineate the drainage above a sampling station
14 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionFollow the water path upstream
- 2ExplanationInspect a depression before changing it
- 3ExampleCompare two possible exits
- 4ExampleAssign the steepest route
- 5ChallengeChoose compatible routing settings
- 6ExplanationCount contributions, then area
- 7ExampleSet a channel-area threshold
- 8ChallengeExplain a changed stream network
- 9ConnectionDescribe branches without estimating discharge
- 10ExamplePut the station on the intended stream
- 11ExampleCheck the returned area
- 12TipLook beyond the polygon edge
- 13ChallengeDiagnose a tiny catchment
- 14RecapTrace each result to its inputs
6Compare sites with a transparent scoring model
13 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionTurn a decision into mapped rules
- 2ExplanationSeparate allowed land from preferred land
- 3TipPrepare and document the layers
- 4ChallengeChoose a factor’s role
- 5ExplanationSet one meaning for high scores
- 6ExamplePlace a boundary value once
- 7ChallengeDetect a reversed preference
- 8ExampleCalculate the first candidate score
- 9ExampleCompare the second candidate
- 10Key InsightKeep enough connected land
- 11ExampleVary a priority and compare again
- 12ChallengeInterpret a high score responsibly
- 13RecapReport candidates with their model choices
Raster and Terrain Analysis practice questions
Set 1: Apply terrain and scoring conventions10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Read grids and choose useful operations10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Connect methods and diagnose results10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Audit a complete raster workflow10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 5: Transfer the methods to new decisions10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
AHP
Aspect
Azimuth
B
Band
Bilinear interpolation
Binary mask
Boolean overlay
Breakline
C
Cell assignment rule
Cell size
Circular data
Conditional expression
Connectivity
Constraint
Continuous raster
Continuous rescaling
Contour
Contributing area
Criterion
Cross-validation
D
D8
Data type
DEM
Direction of preference
Discrete raster
Drainage divide
DSM
DTM
E
Elevation rate
Euclidean distance
Extent
Extrapolation
F
Factor
Flat aspect class
Flow accumulation
Flow direction raster
Focal operation
Focal range
G
Global operation
Grid alignment
H
Hillshade
Horn’s method
I
Inverse distance weighting
K
Kriging
L
Lidar
Light altitude
Local operation
M
Map algebra
N
Natural neighbor interpolation
Nearest neighbor resampling
NoData
Northness
P
Percent rise
Polygonizing
Pour point
R
Raster
Rasterization
Reclassification
Resampling
RMSE
S
Search neighborhood
Semivariogram
Sensitivity analysis
Shreve magnitude
Sink
Sink filling
Slope
Snapping
Spatial autocorrelation
Spatial interpolation
Spline interpolation
Standardization
Strahler order
Stream burning
Stream threshold
Suitability model
T
TIN
V
Vertical datum
W
Watershed
Weight
Weighted overlay
Z
Z-factor
Zonal operation
- 1Geographic Information System
- 2Coordinate Systems and Map Projections
- 3Thematic Maps
- 4GNSS Positioning
- 5Remote Sensing
- 6Vector Spatial Analysis
- 7Raster and Terrain Analysis
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.