Create and Simplify Contours (Defense Mapping)

License Level:BasicStandardAdvanced

Summary

Defense Mapping production tool that generates contours and smooths them for use in cartographic products. Contours are generated from input rasters. Once created, the contours are simplified without altering their essential shape.

Usage

Syntax

CreateAndSimplifyContours_defense (Input_Raster, Map_Scale, Base_Contour, Contour_Interval, Index_Interval, Include_Zero_Contour, Out_Contour_Features, Contour_Subtype, {Input_Area_of_Interest})
ParameterExplanationData Type
Input_Raster
[Input_Raster,...]

A list of rasters from which contours will be created.

Raster Layer
Map_Scale

The scale at which the cartographic product is going to be printed. The tool optimizes cartographic display by setting a minimum feature length based on this scale.

  • 1:5000Contour printing is optimized for scale 1:5000.
  • 1:7500Contour printing is optimized for scale 1:7500.
  • 1:12500Contour printing is optimized for scale 1:12500.
  • 1:25000Contour printing is optimized for scale 1:25000.
  • 1:50000Contour printing is optimized for scale 1:50000. This is the default.
  • 1:100000Contour printing is optimized for scale 1:100000.
  • 1:250000Contour printing is optimized for scale 1:250000.
  • 1:500000Contour printing is optimized for scale 1:500000.
  • 1:1000000Contour printing is optimized for scale 1:1000000.
String
Base_Contour

Base contour value. Contours are generated above and below this value to cover the entire value range of the input raster. Setting this value to 5 and the contour interval to 10 will produce contour lines at 5, 15, 25, -5, -15, and so on. The default is zero.

Double
Contour_Interval

The interval, or distance, between contour lines. This can be any positive number.

Double
Index_Interval

Indicates the index contour interval.

Double
Include_Zero_Contour

Indicates if the tool will create a zero contour. A zero contour represents sea level. Zero contours, when generated along a coastline, may be created inside a water body. Specify ZERO_CONTOUR if you will generate contours on land areas that are at or below sea level.

  • NO_INCLUDE_ZERO_CONTOURDo not include a zero contour. This is the default.
  • INCLUDE_ZERO_CONTOURInclude a zero contour.
Boolean
Out_Contour_Features

An existing Defense Mapping feature class. The tool appends contours to this feature class.

Feature Layer
Contour_Subtype

A subtype in Out_Contour_Features to which contours will be written.

String
Input_Area_of_Interest
(Optional)

An AOI that is contained in a raster and is used to clip the raster before creating contours. A buffer is created before clipping the raster and results in larger output contours that extend beyond the selected AOI.

Feature Layer

Code Sample

CreateAndSimplifyContours example (Python window)

The following code sample demonstrates how to use the CreateAndSimplifyContours tool.

# set gp environment
arcpy.env.workspace="C:/data"

# variables for tool
rasters="elevation.tif"
mapScale="1:12500"
baseContour=0
contourInterval=10

# output feature class must exist
outContours="mgcp.gdb/mgcp/contours"
noIdx="NO_INDEX_CONTOURS"
contourSubtype="FCSubtype"

# execute the tool
arcpy.CreateAndSimplifyContours_defense(rasters,mapScale,baseContour,contourInterval,outContours,contourSubtype)

Environments

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Requires Defense Mapping
ArcGIS for Desktop Advanced: Requires Defense Mapping and Spatial Analyst
11/30/2015