Contour lines
Contour lines are the classic way to draw terrain on a flat map. In Topo Rabbit they’re generated on the fly from elevation data, so you can draw them at any interval, anywhere. That freedom comes with a catch: a contour line can look precise without being accurate. Here’s how they’re made and how to read them.
What is a contour line?
Section titled “What is a contour line?”A contour line joins points of equal elevation. Walk along one and you neither climb nor descend. Lines are drawn at a fixed vertical spacing, the contour interval—every 1 m, 5 m, or 100 m, for example.
Reading them:
- Lines close together mean steep ground; lines far apart mean gentle ground.
- Closed loops mark hilltops—or hollows, if the heights decrease inward.
- V or U shapes pointing uphill mark valleys and streams; pointing downhill, they mark ridges and spurs.
- Index lines are drawn heavier, every 5th line by default, and usually carry the elevation labels so you can count up or down from them.
How does Topo Rabbit calculate contours?
Section titled “How does Topo Rabbit calculate contours?”Contours aren’t stored anywhere. They’re traced from the elevation grid (DEM) each time you change the area or settings:
- Fetch the elevation grid. When you select an area, Topo Rabbit loads elevation tiles covering it at a level of detail suited to the area’s size—roughly a thousand cells across its shorter side.
- Smooth it (optional). With Smoothing above 0, each height is replaced with a weighted average of its neighbours (a Gaussian blur). This removes small bumps before any lines are drawn.
- Choose the levels. With Interval set to Auto, Topo Rabbit picks a round interval (1, 2, 5, 10…) that gives a readable number of lines for the height range in your area. In feet, it picks round foot values. Every elevation that’s a multiple of the interval becomes a contour level.
- Trace each level with “marching squares.” The grid is treated as squares whose four corners are measured heights. For each square and each level, Topo Rabbit checks which corners are above and which are below that level. If the level falls between two corners, the line must cross the edge joining them. The crossing point is placed by linear interpolation: if one corner is at 99 m and the next at 103 m, the 100 m line crosses a quarter of the way along. Connecting the crossings gives a short segment inside each square.
- Join the pieces. Segments that share an end point are stitched into continuous lines, then clipped to your selected area.
- Style and label. Index lines, colours, and labels are applied on the map. Changing them doesn’t recalculate anything.
Squares that touch a cell with no data—the ocean, or a gap in coverage—are skipped, so lines stop at a coastline rather than plunging to zero.
How accurate are the contours?
Section titled “How accurate are the contours?”Contours can never be more accurate than the elevation data they’re traced from. Every line is an interpolation between grid heights. Four things limit accuracy:
- The data’s vertical accuracy. If the source heights are off by 2 m, the 100 m contour is wherever the data says 100 m is. On a gentle slope, that can move the line a long way sideways. On a 5% slope, a 0.5 m height error shifts the line 10 m.
- The data’s horizontal resolution. Features smaller than a cell or two—a drainage ditch, a retaining wall, a kerb, a narrow ridge—aren’t in the grid, so no contour can show them. Between grid points the ground is assumed to change linearly, so sharp breaks of slope are rounded off.
- What surface was measured. Where the data is a surface model (DSM), contours wrap around buildings and treetops. See DSM vs DTM.
- Age. The lines show the ground as it was when it was surveyed—before the new road, the earthworks, or last year’s landslide.
Smoothing makes lines cleaner and easier to read, but it doesn’t add accuracy. It shifts lines slightly and flattens real crests and hollows along with the noise.
A useful rule from map making
Section titled “A useful rule from map making”Traditional map standards tie the contour interval to the data’s accuracy. The long-standing U.S. National Map Accuracy Standards, for example, require that 90% of tested elevations be within half a contour interval. Turned around:
A sensible minimum contour interval is about twice the vertical error of your data.
Smaller intervals can still draw lines, but those lines are partly tracing measurement noise.
Contour interval vs DEM resolution
Section titled “Contour interval vs DEM resolution”These are easy to confuse because both are “sizes,” but they measure different things:
- DEM resolution is horizontal: the spacing between measured heights on the ground.
- Contour interval is vertical: the height difference between neighbouring lines.
Choosing a 0.5 m interval doesn’t make 30 m data more detailed. It just draws more lines through the same heights. What you see depends on how the two interact with the slope:
- Interval too small for the data. On flat or gently sloping ground, the real height change across a cell is tiny—often smaller than the data’s errors. Lines start following noise: they wiggle, break into small closed loops, and wander between real features. With coarse data, you may also see straight facets and sharp corners where the line crosses large, flat-sided cells.
- Interval too large for the terrain. On gentle ground, real features such as a shallow swale or a building platform fall between two levels and simply don’t appear.
- Steep terrain. On a cliff or steep slope, many contour levels can fall within a single cell, so lines bunch together and lose detail. Real rock steps and benches narrower than a cell are smoothed into an even slope.
The horizontal spacing between neighbouring lines is roughly the interval divided by the slope. A 1 m interval on a 10% slope gives lines about 10 m apart; on a 2% slope, 50 m apart. If that spacing is much smaller than a few DEM cells, the data can’t really resolve the lines you’re asking for.
Rule-of-thumb intervals
Section titled “Rule-of-thumb intervals”| Elevation data | Typical vertical error | Reasonable finest interval |
|---|---|---|
| LiDAR, 0.5–1 m cells | ~0.1–0.2 m | 0.2–0.5 m |
| LiDAR, 2–5 m cells | ~0.2–0.5 m | 0.5–1 m |
| National models, ~10 m | ~1–3 m | 2–5 m |
| Global 30 m (Copernicus GLO-30) | a few metres; more under forest and in steep terrain | 5–10 m (10–20 m in rugged or forested areas) |
These are starting points, not guarantees. Accuracy varies within a dataset, and is usually best on open, flat ground and worst under dense vegetation and on steep slopes.
How do I choose good contour settings?
Section titled “How do I choose good contour settings?”- Check your data first. Select your area and look at the Data row in the selection details. Select See Source to see which dataset you’re using and its nominal resolution.
- Start with Auto. It picks an interval suited to the height range in your selection.
- Go finer only if the data supports it. Use the table above. If lines turn wiggly or break into small loops on flat ground, the interval is below what the data can resolve.
- Select a smaller area for more detail. The analysis grid follows your selection’s size, so a smaller area uses finer data—up to the source’s own resolution.
- Use Smoothing for presentation. A little smoothing (1–3) tidies lines for drawings and reports. Turn it off when you need the lines as close to the data as possible.
- Use index lines and labels. Under More options, set Index every to 5th or 10th and Labels to Index to keep a dense map readable.
Why did my interval change on its own?
Section titled “Why did my interval change on its own?”Topo Rabbit draws at most 200 contour levels in one area. If your interval would create more—say 0.5 m contours across a 300 m tall hillside—it moves up to the finest round interval under that limit and shows a note. Select a smaller or flatter area to use the finer interval.
Can I use these contours for design or construction?
Section titled “Can I use these contours for design or construction?”Use them for site exploration, early design, and presentation. You can export them as DXF for CAD, along with other layers. For grading design, drainage, setting levels, or any work with tolerances, use contours from a current topographic survey of the site. Even very good open LiDAR data is a snapshot from the past, and it isn’t certified for your purpose.
Related layers
Section titled “Related layers”- Elevation colours the same heights as a continuous map.
- Slope measures what contour spacing shows: the closer the lines, the steeper the ground.
- Hillshade under contours makes the landform much easier to read.
- Drainage: streams cross contours at right angles, through the Vs that point uphill.
Read about elevation data and its sources → · Open the editor → · Back to the knowledge hub