How To: Create contours and symbolize the result using index contours
The procedure below is for ArcGIS 9.3.1 or earlier versions. Starting at ArcGIS 10.0, expressions in the Calculator are created using only VBScript or a standard Python format.
Contour maps typically symbolize index contours with a thicker line symbol. This article shows how to do this with data that only has contour height in the attribute table.
- In ArcMap or ArcScene, open the contour feature class attribute table and add an integer field that stores ones for index contours and zeros for all others.
- Select the added field.
- Open the Calculator and click the Advanced option.
- Copy this code into the 'Pre-logic VBA Script Code' display window:
dim dIndexInterval as double
dIndexInterval = 50 ' set to interval of index contours
' in z units (typically 5 times
' regular contour interval'
dim dCont as double
dCont = [Contour] ' Set to contour height field
dim i as long
i = dCont / dIndexInterval
if ( ( dCont / dindexInterval) - i = 0) then
dim j as long
j = 1 ' is an index contour
j = 0 ' is not
- Type 'j' (without quotes) in the text input field at the bottom of the dialog box and click OK.
- Symbolize the layer using a categorical classification based on the new field. Contours with a value of one are index contours; all others are regular contours.
Article ID: 000004672
Software: ArcGIS - ArcEditor 9.2, 9.3, 9.3.1 ArcGIS - ArcInfo 9.2, 9.3, 9.3.1 ArcGIS - ArcView 9.2, 9.3, 9.3.1