Ask A Cartographer

Labeling contours ala topographic maps

September 24 2007 | 2 comments
Categories: Labeling, Maplex

I manually label index contours so they conform to cartographic standards and conventions. This
is very labour intensive in ArcView 9.2 I have used an SQL expression to auto-label only the index contours, but the placement of the labels leaves much to be desired. Is there a faster way to place contour labels so they look like the ones you see on a topographic map?
Thanks

Mapping Center Answer:

I have a couple of tricks I use to get a better result for this problem. Both involve using Maplex. The first trick is easy, use the Street placement option. That will introduce some laddering. The second trick is to use a combination of repeat labels and remove duplicates; if your distance for repeat labels is Y, then the distance for remove duplicates should be 60-80% of Y (depends on whether you want more labels or fewer labels). The idea is to create annotation that typically requires me to remove a few labels and strategically add a few labels.

In terms of general settings for Maplex, I:

- use straight placement (on the line).

- set my label class’s SQL query to only label contours longer than 2 * pi * d; where d = the width of 3 or 4 character label in map units. This keeps labels from being placed awkwardly at the tops of hills.

- create annotation for all my other labels first, then label and create annotation for contours afterwards—this is because the contour geometry is often so rich that it slows the labeling engine down too much to tolerate.

- buffer my spot elevations and use these buffers with feature weight rankings of 1000; to keep contour labels from being placed near spot elevations. In general, I have found that I use different feature weight rankings for contours, which is another reason to create annotation for contours last. For instance I’ll use feature weights on all roads, versus just major roads, when I produce contour anno.

- make the labeling go faster. To do this I generalize (Simplify Line tool using the point remove option) just a little bit; not to change the shape to the point of creating topological errors, but just to remove 50-70% or so of the vertexes that are not really helping to define the shape relative to what’s needed for label placement.

+ To figure out what tolerance to use, I start editing on the contours, select one that is particularly curvy and zoom in on it. Then change the edit task to Modify features so I can see the vertexes (turn off your maps reference scale if you’re using one in order to do this). Then on the Advanced Editing toolbar I use the generalize tool and through trial and error (undo-ing each time I am not satisified) find the tolerance that will work best.

+ I use that tolerance value in the simplify line tool. The key there is that both the generalize tool and the point remove option of the Simplify Line tool use the same algorithm: Douglass-Peucker.

+ Then I label and create my annotation for the generalized lines—usually 3-10x faster.

+ Also, I usually do a less aggressive simplification of the contour lines and use them for my map because they’ll draw much faster.

My last step, is to create masks (Feature Outline Mask tool)—usually there’s not much point in doing that until I’m ready to do check plots.

So, I hope you’ve got Maplex, because at 9.2 there’s nothing that’s going to help very much beyond simplifying the contours to increase drawing performance.

Last, there is some good news on the horizon: for 9.3 we are adding a new, and I think better, contour line tool and some Maplex options for contours that include some options to deal with uphill and downhill preferences and relative to page option, both of which vary by country, and a better laddering option than using the Street Placement Option.

labeling expression posted by Gabi Voicu on May 26 2010 10:05AM
...what is that labeling expression that you have used to avoid labels on top of the hill?...how can we calculate with d?..can you post that?
Keeping hilltops free of labels posted by Charlie Frye on May 26 2010 12:52PM
The way I would keep labels off of hilltops would be to have points on the hilltops, and then give them marker symbol that is a single layer, set to "No Color" and then a size of 18-24 pts. Last, in the Label boundary weights, give that layer a weight of 1000. Basically, you can add points to that layer as you need for keeping important areas of the map free of text.

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

Contact Us | Legal | Privacy |