Contour List (Spatial Analyst)

Summary

Creates a feature class of selected contour values from a raster surface.

Learn more about how Contouring works

Usage

Syntax

ContourList (in_raster, out_polyline_features, contour_values)
ParameterExplanationData Type
in_raster

The input surface raster.

Raster Layer
out_polyline_features

Output contour polyline features.

Feature Class
contour_values
[contour_value,...]

List of z-values for which to create contours.

Double

Code Sample

ContourList example 1 (Python window)

This example creates contours for three elevation values from an ESRI GRID raster and outputs them as a shapefile.

import arcpy
from arcpy import env  
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
ContourList("elevation", "C:/sapyexamples/output/outcontourlist.shp", [600, 935, 1237.4])
ContourList example 2 (stand-alone script)

This example creates contours for three elevation values from an ESRI GRID raster and outputs them as a shapefile.

# Name: ContourList_Ex_02.py
# Description: CCreates contours or isolines based on a list of contour values.
# Requirements: Spatial Analyst Extension
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inRaster = "elevation"
contourIntervalList = [600, 935, 1237.4]
outContours = "C:/sapyexamples/output/outcontourlist02.shp"

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Execute ContourList
ContourList(inRaster, outContours, contourIntervalList)

Environments

Related Topics

Licensing Information

ArcView: Requires Spatial Analyst or 3D Analyst
ArcEditor: Requires Spatial Analyst or 3D Analyst
ArcInfo: Requires Spatial Analyst or 3D Analyst

6/29/2011