Generate Topographic Contours (Topographic Production Tools)
Summary
Creates and smooths contours from an input raster.
Usage
This tool supports local raster files only.
The Area of Interest, Input Rasters, and Target Contour Features parameter values must have the same spatial reference.
If more than one input raster is used, all input rasters must have the same cell size, band count, and pixel type. All input rasters should also use the same elevation units (meters or feet).
The Area of Interest parameter value is used to limit the extent where the contours will be created. Typically, the Area of Interest parameter value will be a polygon feature that represents the extent of a map sheet at the specified scale. It will be buffered to ensure that contours extend to the full edge of the sheet and to reduce edge matching issues between sheets. Contours will only be created over the portions of the rasters that overlap with the extent of the buffered area of interest.
Use the Map Scale parameter to refine the appearance of the contours to be optimized for print and display at the specified scale. Specifying a scale sets the default contour values for several parameters based on the scale. The scale value also determines the minimum length of the contours and the smoothing tolerance that will be used to refine their appearance. When the scale and any of the parameters that calculate their default values from it are left blank, the tool will use the 1:50,000 scale to calculate the values.
To clear contour values after they are automatically populated, choose the empty value at the top of the Map Scale drop-down list. Then specify the correct scale for the Map Scale parameter to repopulate the default contour values.
This tool also supports smoothing of the input rasters before creating the contour lines. When you set a Raster Smooth Tolerance parameter value, the tool uses the Adaptive Smoothing parameter from the Contour raster function to prepare the raster before generating contour lines. Depending on the tolerance used, the result can be contour lines that are smoother and more cartographically pleasing but less accurate.
This tool does not create a new output feature class; it adds the contours to an existing feature class. Most topographic agencies have defined the feature class, subtypes, and attributes appropriate for describing their elevation features in their existing data schema. Rather than creating a new output that must be mapped to that schema as a postprocess, this tool will add the results directly to the specified feature class.
A base contour is used, for example, to create contours every 15 meters, starting at 10 meters. In this case, 10 is used for the base contour, and 15 is used for the contour interval. The values to be contoured are 10, 25, 40, and 55.
Providing a base contour does not prevent contours from being created above or below that value.
If the raster contains negative elevation values, a zero contour will be included with the contours that are appended to the Target Contour Features parameter value. This occurs even if the optional Include Zero Contour parameter isn't checked.
If the Input Rasters parameter value contains an area with no data, such as a hole, the contours may intersect.
In addition to the contour elevation, you can populate the Contour Code Field parameter with information about the type of contour. When a Contour Code Field value is defined, use the following parameters to ensure that the field values are correctly populated:
Contour Index Interval—Distinguish index contours from intermediate contours.
Index Code—The value that will populate the Contour Code Field parameter value when the elevation of the contour is evenly divisible by the index interval and the contours are increasing in elevation.
Intermediate Code—The value that will populate the Contour Code Field parameter value when the elevation of the contour is not evenly divisible by the index interval and the contours are increasing in elevation.
Depression Code—The value that will populate the Contour Code Field parameter value when the elevation of the contour is evenly divisible by the index interval and the contours are decreasing in elevation.
Depression Intermediate Code—The value that will populate the Contour Code Field parameter value when the elevation of the contour is not evenly divisible by the index interval and the contours are decreasing in elevation.
The tool supports various Topographic Mapping data model schemas. If the feature class provided as the Target Contour Features parameter value matches one of these schemas, the values for the Contour Height Field, Contour Subtype, Contour Code Field, Index Code, Intermediate Code, Depression Code, and Depression Intermediate Code parameters will automatically be set to the values appropriate for that schema.
The geometry of the contours can be further refined after they are created. Specifying a Contour Minimum Length parameter value will remove any isolated contours smaller than the length provided. For example, a contour line that encloses a peak but is only 10 meters long can be too short to be clearly visualized on a 1:100,000 scale map. Depending on the cell size of the input raster, the contour lines can have a coarse, blocky appearance. Use the Contour Smooth Tolerance parameter to apply a line smoothing algorithm to the contour lines to refine sharp angles and create smoother contours.
When using an input raster with elevation units in meters, map scales of 1:250,000 or smaller use a z-factor of 3.28084 to convert meters to feet. The resulting value is rounded up to the next highest 5-foot interval.
When using low-resolution input rasters, you can resample rasters to improve the contour output by checking the Resample Raster parameter. Generally, high-resolution input rasters do not need to be resampled.
Checking the Resample Raster parameter to process large Input Rasters values requires large amounts of disk space for processing.
Using a raster that only covers the target area helps lower processing times and mitigate memory issues. Smaller areas with a single raster take less computational effort to process than mosaics across a large area.
Do not resample a raster if its pixel depth is already high.
Use a midrange pixel depth if you are processing contours. Contour lines on a raster using a high pixel depth can cause issues. For example, if various loops or small tops with a 32-bit unsigned raster are visible, try using a 16-bit unsigned raster.
Parameters
| Label | Explanation | Data type |
|---|---|---|
|
Input Rasters |
The input raster layers that will be used to derive the contour lines. |
Raster Layer; Mosaic Layer |
|
Area of Interest |
A feature layer that will be used to clip the input raster before processing. A buffer is created before clipping the raster, which results in larger output contours that extend beyond the selected area of interest. The feature layer must have only one selected feature. |
Feature Layer |
|
Target Contour Features |
An existing line feature class or feature layer. Contours will be appended to this feature class. |
Feature Layer |
|
Contour Elevation Field |
The field from the input contours that will store the contour elevation value. This field defaults to |
Field |
|
Contour Subtype (Optional) |
The subtype to which contours will be written if the input contours have subtypes. |
String |
|
Map Scale (Optional) |
Specifies the scale that will be used to optimize contours. This is the scale of the cartographic product that will be printed. Specifying the scale will set the defaults of other parameters to values that are appropriate for the output scale. The default is 1:50,000.
|
String |
|
Resample Raster (Optional) |
Specifies whether the input raster will be resampled before creating contours.
|
Boolean |
|
Contour Interval (Optional) |
The interval, or distance, between contour lines. This can be any positive number. The default is set by the scale value. If this parameter is left blank, the default scale value will be used. |
Double |
|
Base Contour (Optional) |
The value that contours will be generated above and below to cover the entire value range of the input raster. The default is 0. |
Double |
|
Z Factor (Optional) |
The unit conversion factor that will be used when generating contours. The default is 1. The contour lines are generated based on the z-values in the input raster, which are often measured in units of meters or feet. With the default value of 1, the contours will be in the same units as the z-values of the input raster. To create contours in a unit other than that of the z-values, set an appropriate value for the z-factor. It is not necessary that the ground x,y and surface z-units be consistent for this tool. For example, if the elevation values in the input raster are in meters but you want the contours to be generated in feet, set the z-factor to 3.28084 (1 meter = 3.28084 feet). |
Double |
|
Include Zero Contour (Optional) |
Specifies whether a zero contour will be created. A zero contour represents sea level. Zero contours, when generated along a coastline, can be created inside a water body. Check the parameter if you want contours generated on land areas that are at or below sea level.
|
Boolean |
|
Contour Code Field (Optional) |
The field from the input contour feature class where the appropriate code will be stored. The default field is |
Field |
|
Contour Index Interval (Optional) |
The interval, or distance, between index contour lines. For example, if the contour interval is 20 meters and you want index contours every 100 meters, specify 100. The default is set by the scale value. |
Long |
|
Index Code (Optional) |
The code value that will be stored in the Contour Code Field parameter value when an index contour is identified. The default code is 1 if the |
String |
|
Intermediate Code (Optional) |
The code value that will be stored in the Contour Code Field parameter value when an intermediate contour is identified. The default code is 2 if the |
String |
|
Depression Code (Optional) |
The code value that will be stored in the Contour Code Field parameter value when a depression contour is identified. The default code is 5 if the |
String |
|
Depression Intermediate Code (Optional) |
The code value that will be stored in the Contour Code Field parameter value when a depression intermediate contour is identified. The default code is 6 if the |
String |
|
Raster Smooth Tolerance (Optional) |
The amount of smoothing that will be applied to the input raster before creating the contour lines. |
Double |
|
Contour Minimum Length (Optional) |
The minimum length that will be used for an individual contour line. The default is set by the scale value. If the value is set to 0 or left blank, no contours will be deleted from the output contours based on their short length. |
Linear Unit |
|
Contour Smooth Tolerance (Optional) |
The amount of smoothing that will be applied to the contour lines. The larger the value, the more generalized the contours. The default is set by the scale value. If this parameter is set to 0 or left blank, no smoothing will be applied to the output contours. |
Linear Unit |
|
Supplemental Contours (Optional) |
Specifies the interval at which a contour line will be placed between regularly spaced contours. This is used when the terrain change is not large enough to be depicted with consistent contour intervals.
|
String |
|
Half Auxiliary Code (Optional) |
The code value that will be stored in the Contour Code Field parameter value when a half auxiliary contour is identified. The default code is 3 if the |
String |
|
Quarter Auxiliary Code (Optional) |
The code value that will be stored in the Contour Code Field parameter value when a quarter auxiliary contour is identified. The default code is 14 if the |
String |
|
Depression Auxiliary Code (Optional) |
The code value that will be stored in the Contour Code Field parameter value when a depression auxiliary contour is identified. The default code is 22 if the |
String |
Derived output
| Label | Explanation | Data type |
|---|---|---|
|
Updated Contour Features |
The output generated when features are added to the Target Contour Features parameter value. |
Feature Layer |
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: No
- Standard: No
- Advanced: Requires Topographic Mapping or Aviation Airports or Aviation Charting or Maritime or Bathymetry and Spatial Analyst