ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Code Contours

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

ArcGIS Defense Mapping cartographic production tool that applies hypsographic codes to input contour features. Applied codes are specific to defense schemas and include index contours, intermediate contours, depressions, tops, and other types listed in your defense data model.

Usage

  • Input Contours should contain an HQC field. The tool returns HQC Field not found if the field is not present.

  • The tool uses values in Contour Height Field to calculate an appropriate HQC code. Codes include values 0 through 9, 14, 22, and 999. The LCA010HQC coded-value domain will convert these codes into Hypsographic Portrayal Type values.

  • Raster Layer is used to derive elevations of points in tops and depressions in Input Contours.

Syntax

arcpy.defense.CodeContours(in_contour_features, contour_height_field, contour_index, in_raster)
ParameterExplanationData Type
in_contour_features

Contour features to which subtype codes will be applied.

Feature Layer
contour_height_field

Field in the contour features that contains elevation values.

Field
contour_index

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

Long
in_raster
[in_raster,...]

Rasters used to derive highest or lowest elevations within contour tops or depressions.

Raster Layer

Code sample

CodeContours example (Python window)

The following code sample demonstrates how to execute the CodeContours function.

# set gp environment
arcpy.env.workspace="c:/data"
arcpy.env.addOutputsToMap = True

# variables for the CodeContours tool
# Contour.gdb is located in c:/data
contourFeatures="Contour.gdb/MGCP/ContourL50K"
contourHeightField="ZVH"
contourIndex="100"

# raster N35.DT2 is located in c:/data/W121
raster="W121/N35.DT2"

# execute the CodeContours tool
arcpy.CodeContours_defense(contourFeatures, contourHeightField, contourIndex, raster)

Environments

  • Current Workspace

Licensing information

  • Basic: No
  • Standard: Requires Defense Mapping
  • Advanced: Requires Defense Mapping

Related topics

  • An overview of the Contours toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal