CONTOUR

Generate contours from a raster image


EnvironmentsPYTHON :: EASI :: MODELER
Batch ModeYes
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Related

Back to top

Description


Creates a vector segment containing contour lines from a raster image, such as an elevation (DEM) image, given a specified contour interval. The contour value for each line is saved in either the z-coordinate of all vertices or in a separate attribute field.
Back to top

Parameters


Name Type Length Value range
Input: Input elevation channel * Raster port 1 - 1  
Output: Output contour segment * Vector port 1 - 1  
Vector Layer Name * String 1 - 1  
Vector Layer Description String 0 - 1  
Contour Interval * Float 1 - 1  
Contour Offset Float 0 - 1  
Background Gray-Level Value Float 0 - 1  
Field Name String 0 - 1 Default: ATTRIBUTE

* Required parameter
Back to top

Parameter descriptions

Input: Input elevation channel

Specifies the image channel that contains raster or elevation (DEM) data. The input image channel can be any type; DEM data is usually a 16-bit signed integer.

Output: Output contour segment

Specifies the output segment to receive the new vector contour data.

Vector Layer Name

Specifies a name (up to 8 characters) for the output vector segment. The default segment name is "CONTOUR".

Vector Layer Description

Optionally describes (in up to 64 characters) the contents or origins of the output data.

Contour Interval

Specifies the interval between contour lines. The specified value must be a positive number.

Contour Offset

Optionally specifies an offset to added to each contour value.

The contour offset must be a value between zero and the specified interval value; the default is 0.0.

Background Gray-Level Value

Specifies the background elevation (NO DATA) value in the input raster or DEM elevation image.

Field Name

Specifies the name of the double-precision field in which the contour value is stored. The field name is not case-sensitive.

If this parameter is specified as ATTRIBUTE or <field>, the contour value is saved in a double-precision field using the specified name.

If this parameter is specified as ZCOORD, the contour value is saved in the z-coordinates each vertex instead of in a field.

Available options are:
Back to top

Details

CONTOUR creates a set of elevation contours based on an input raster or DEM image.

CONTOUR creates a new vector segment that contains contour lines for a specified rectangular window (DBIW) of the input image channel (DBEC). The contour value of each line is assigned to either z-coordinates for vertices (FLDNME="zcoord") or to a specified double-precision field name (FLDNME).

The contour interval (CONTINT(1)) specifies the interval between the contour values for each line. An optional offset (CONTINT(2)) can be added to each contour value. The offset default is zero.

For example, assume that the input image is a 32-bit real image containing values from -0.4 to +0.7, and that the Contour Interval and Contour Offset are set as follows:
Contour Interval	=	0.2
Contour Offset	=	0.1

This generates contours at -0.3, -0.1, 0.1, 0.3, 0.5 and 0.7.

The new vector segment is given a segment name (DBSN) and an optional description (DBSD). The vector segment contains only lines (no interior points).

Input pixels having the specified background gray-level value (BACKVAL) have an unknown elevation and are not used for generating contours. If the background gray-level value is not specified, all input pixels are assumed to have valid elevation values. The background gray-level value is typically set to zero, where the raster image is not rectangular and zeros are used around the border of the image.

The locations of the vertices for the contour lines are interpolated from the input image data.

The georeferencing segment from the PCIDSK file defines the units used for the vertices.

The vector segment created by CONTOUR can be used by interpolation programs (such as NNINT) to create an interpolated raster image, which should be similar (but not identical) to the original input image.

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.