Ask A Cartographer

How to symbolize topo lines

December 09 2008 | 5 comments
Categories: ArcGIS Methods

I'm trying to come up with a straightforward way to symbolize topographic contours from a polyline featureclass. For example, I would like to be able to make multiples of 250 darker lines than the others. Ideally I would like to do this without having to add columns to the featureclasses, and without having to manually specify each contour interval that I want to be dark.

I thought perhaps I could write a definition query that would select multiples of 250, but I have had no luck finding a function that returns a remainder or something along those lines.


Mapping Center Answer:

Add a short integer field to the contours data.  Calculate that field using an Advanced field calculator statement, like:

k = 0
if [Contour] MOD 250 = 0 then
k = 1

Set the result to = k.

Using a definition query will slow drawing performance to an unacceptable level.

Also on the ArcGIS Resources page... posted by Aileen Buckley on Dec 9 2008 8:59AM
We have two different calculate statements on the ArcGIS Resources page of Mapping Center that you can download. You can use these to identify 50 and 200 ft index contours - and, of course, you can modify it to indicate other index intervals.
Trying to avoid additional fields... posted by Ryan Clark on Dec 9 2008 9:13AM
The only problem is that I am pulling contour data from ~60 different featureclasses at this point, and I would rather not add a column to each of them if it can be avoided.

The MOD function works in the definition query, and I'll use that for the time being, though I may load the shapefiles into a geodatabase for annotation purposes, in which case I'll add an extra column.
SQL Mod() Function for Def. Query posted by Charlie Frye on Dec 9 2008 9:24AM
Use a definition query like this one:

mod( "contour", 250) = 0
Definition Syntax posted by Ryan Clark on Dec 10 2008 3:18PM
The syntax for the a definition query (or the Field Calculation) seems to be different depending on the data source.

For Shapefiles: mod("Contour", 200) = 0
For SQL Server FeatureClasses: Contour % 200 = 0
for MS Access FeatureClasses: [Contour] MOD 200 = 0

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |