Surface Contour (3D Analyst)

Summary

Creates a feature class containing a set of contours generated from a terrain dataset or TIN surface. The output feature class is 2D and contains an attribute with contour values.

Learn more about how Surface Contour (3D Analyst) works

Illustration

TIN Contour illustration

Usage

Syntax

SurfaceContour_3d (in_surface, out_feature_class, interval, {base_contour}, {contour_field}, {contour_field_precision}, {index_interval}, {index_interval_field}, {z_factor}, {pyramid_level_resolution})
ParameterExplanationData Type
in_surface

The input terrain dataset or TIN surface.

Tin Layer; Terrain Layer
out_feature_class

The output feature class.

Feature Class
interval

The interval between the contours.

Double
base_contour
(Optional)

Along with the index interval, the base height is used to determine what contours are produced. The base height is a starting point from which the index interval is either added or subtracted. By default, the base contour is 0.0.

Double
contour_field
(Optional)

The field containing contour values.

String
contour_field_precision
(Optional)

The precision of the contour field. Zero specifies an integer, and the numbers 1–9 indicate how many decimal places the field will contain. By default, the field will be an integer (0).

Long
index_interval
(Optional)

The difference, in Z units, between index contours. The value specified should be evenly divisible by the contour interval. Typically, it’s five times greater. Use of this parameter adds an attribute field to the output feature class that’s used to differentiate index contours from regular contours.

Double
index_interval_field
(Optional)

The name of the field used to record whether a contour is a regular or an index contour. By default, the value is ‘Index’.

String
z_factor
(Optional)

Specifies a factor by which to multiply the surface heights. Used to convert z units to x and y units. The Z factor parameter only affects results for rasters and TINs, not terrain datasets.

Double
pyramid_level_resolution
(Optional)

The pyramid level resolution of the terrain dataset to use for interpolation. The default is 0, full resolution.

Double

Code Sample

Surface Contour Example 1 (Python window)

The following Python Window script demonstrates how to use the Surface Contour function in immediate mode.

import arcpy
from arcpy import env

arcpy.CheckOutExtension("3D")
env.workspace = "C:/data"
arcpy.SurfaceContour_3d("sample.gdb/featuredataset/terrain", "contour.shp", 10)
Surface Contour Example 2 (stand-alone script)

The following Python script demonstrates how to use the Surface Contour function in a stand-alone script.

'''****************************************************************************
Name: SurfaceContour Example
Description: This script demonstrates how to use the 
             SurfaceContour tool.
             
****************************************************************************'''

# Import system modules
import arcpy
from arcpy import env

# Obtain a license for the ArcGIS 3D Analyst extension
arcpy.CheckOutExtension("3D")

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

# Set Local Variables
inSurface = "sample.gdb/featuredataset/terrain"
outContour = arcpy.CreateUniqueName("contour.shp")

#Execute SurfaceContour
arcpy.SurfaceContour_3d(inSurface, outContour, 10)

del inSurface, outContour, arcpy

Environments

Related Topics

Licensing Information

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

11/10/2011