How Contouring works

Contours are lines that connect locations of equal value in a raster dataset that represents continuous phenomena such as elevation, temperature, precipitation, pollution, or atmospheric pressure. The line features connect cells of a constant value in the input. Contour lines are often generally referred to as isolines but can also have specific terms depending on what is being measured. Some examples are isobars for pressure, isotherms for temperature, and isohyets for precipitation.

The distribution of the contour lines shows how values change across a surface. Where there is little change in a value, the lines are spaced farther apart. Where the values rise or fall rapidly, the lines are closer together.

The contour creation tools, Contour, Contour List and Contour with Barriers, are used to create a polyline feature dataset from an input raster.

Why create contours?

By following the polyline of a particular contour, you can identify which locations have the same value. Contours are also a useful surface representation, because they allow you to simultaneously visualize flat and steep areas (distance between contours) and ridges and valleys (converging and diverging polylines).

The example below shows an input elevation dataset and the output contour dataset. The areas where the contours are closer together indicate the steeper locations. They correspond with the areas of higher elevation (in white on the input elevation dataset).

Contours generated from input surface example

The contour attribute table contains an elevation attribute for each contour polyline.

Contour quality

The contour tools produce engineering-quality contours, representing an exact interpretation of the raster surface. Overall contour accuracy depends on how well the data used to create the input raster represents the actual surface.

The size of the raster cells used affects the appearance of the output contours. A large cell size may result in coarse, blocky contours.

Occasionally, engineering-quality contours may cross, appear to intersect, or form an unclosed branching line. Crossing contours can occur in saddle regions that lie exactly on a contour interval. In other cases, the contours may pass so close to one another that they appear to intersect. Branching contours can occur in cases of intersecting ridges that fall exactly on a contour interval. These are all valid engineering-quality interpretations of the surface that cartographers typically modify for aesthetic purposes.

Controlling contour quality

Occasionally, contours may be created that have square or blocky outlines, appearing to follow raster cell boundaries. This can occur when the raster values are integers and they fall exactly on a contour. This is not a problem, merely an exact contouring of the data.

If you want smoother contours, some ways to overcome this condition include smoothing the source data or adjusting the base contour.

Smoothing the data

The easiest smoothing approach would be to preprocess the input raster with the Focal Statistics tool, using the Mean statistic.

Another method is to slightly adjust z-values so a contour will no longer pass exactly through the cell centers of the raster. Again, the Focal Statistics tool is used, but instead with a custom weighted kernel file and the Sum statistic. The structure of the kernel file is:

3 3
.005 .005 .005
.005 .960 .005
.005 .005 .005

The accuracy of the contour will not be significantly affected because the z-value adjustment is small and heavily weighted in favor of the center raster cell.

Adjusting the base contour

Adjusting the base contour involves offsetting the base contour such that the contours no longer pass exactly through the cell centers. The offset can be very small; values as small as 0.0001 have been effective.

NoteNote:

To apply this technique to the Contour List tool, simply adjust the values in the contour list. For example, instead of 600, 650, 700, and so on, use 600.001, 650.001, 700.001, and so on, instead.

Data issue with USGS DEMs

LegacyLegacy:

Tests have revealed that contours generated from rasters created from some older United States Geological Survey (USGS) 7.5-minute digital elevation models (DEMs) may not have the same level of detail as exhibited on the corresponding map sheet available from USGS. This appears to be a factor of the sampling interval inherent in the DEM. USGS 7.5-minute DEMs are sampled at 30-meter intervals, while the contours on the map sheets appear to have been digitized directly from stereo models at a much higher level of detail. The newer SDTS format DEMs from the USGS do not have this problem.

Related Topics

11/8/2012