Overlay Contour Lines

This topic describes how to display contour lines on a single-band raster layer with the New Contour Layer menu option.

This option provides a quick display of contour lines in the current view, whereas the Generate Contour Lines tool (available in the ENVI Toolbox) creates contour lines at full resolution and saves them to a shapefile.

With the New Contour Layer option, all of the lines will have the same color, style, and thickness. Contour lines can only be displayed on raster layers that have not been reprojected in the view. If contour lines are displayed and the base projection of the view changes, the contour lines will be removed.

Follow these steps:

  1. Open and display a single-band raster such as a digital elevation model (DEM) or any dataset where you want to categorize the data with contour lines.
  2. Right-click on the raster layer and select New Contour Layer. An initial set of contour lines is displayed.
  3. Contour line properties are displayed beneath the Toolbox in the lower-right corner of the ENVI application. Here you can update the contour line properties on a case-by-case basis in the current ENVI session. The properties are described below.

Tip: These properties are also available as preferences that you can set for all contour lines that are displayed in subsequent ENVI sessions. Select File > Preferences from the ENVI menu bar. In the Preferences dialog, expand the Annotations folder and click Contours.

To create a screen capture of a raster layer with contour lines, use the menu items described in the Chip to View topic.

Set the Level of Detail Property

Displaying full-resolution contour lines on a raster layer can potentially take a long time, depending on the size of the raster layer. To circumvent this, a reduced-resolution version of the raster data is used to display contour lines. Use the Level of Detail (pixels) property to set the size of the reduced-resolution raster data. This does not modify the original data; it only defines a reduced-resolution image that is used internally to approximate the contour lines.

The default value is 1000, which means the maximum X dimension will be 1000 pixels. The Y dimension will resize accordingly. For example, if a raster has a size of 24,000 x 48,000 pixels, the resampled version will have a size of 1,000 x 2,000 pixels.

Higher values will result in longer display times for contour lines. Experiment with different values to see how they affect the resolution and accuracy of the contour lines.

To create contour lines from full-resolution data, export the contour lines to a shapefile or use the Generate Contour Lines tool.

Set Level Properties

ENVI determines reasonable estimates for default values of the first two properties below, based on the minimum and maximum values of the raster data. You can change them as desired:

Set Contour Properties

Update the following properties:

Set Label Properties

Update the following properties:

Export Contour Lines to a Shapefile

Exporting contour lines to a shapefile offers the following benefits:

Right-click on a contour layer in the Layer Manager and select Export Layer to Shapefile. The resulting shapefile is displayed in the view.

See Also

Generate Full-Resolution Contour Lines, Vectors