By Aileen Buckley, Mapping Center Lead
Variable-depth masking is an ArcMap drawing technique (available at the ArcInfo level) for hiding parts of one or more layers. One common use for masking is to clarify the legibility of a map that’s packed with text and features.
In the contour map example below, contour lines and annotation features for the contour labels overlap each other making it difficult to read the contour values.
One approach to making the labels more legible might be to use text halos. This approach is fine if the background is a single color – white in the example below.
But when the background colors vary across the map, for example, when a hillshade and an elevation tint are displayed as in the example below, no one color will work for all the halos.
To remedy this, use variable-depth masking. With variable-depth masking, only some layers are hidden by the masks. By using a mask for the annotation, sections of contour lines are hidden, while the elevation shading underneath the masks remains visible.
Variable-depth masking for contour labels involves three steps:
- creating annotation from the labels,
- using the Feature Outline Masks tool to create masks, and
- using the Advanced Drawing Options > Masking settings to specify which layers the masks will mask out.
Creating annotation from the labels
The first thing you need to do is create annotation from the labels. Variable-depth masking requires geodatabase annotation so be sure to select the option to store the annotation in a database when you convert the labels to annotation.
- Prepare your labels for conversion by ensuring the proper scale and label properties are set.
- To convert labels from one layer, right-click the layer in the ArcMap table of contents. To convert labels from more than one layer, right-click the data frame.
- Click Convert Labels to Annotation.
- For Store Annotation, click In a database.
- Specify the features for which you want to create annotation.
- To create feature-linked annotation, check the Feature Linked box. To create standard annotation, leave the box unchecked.
For more information on preparing labels for conversion, see the online help topic About converting labels to annotation.
Using the Feature Outline Masks tool to create masks
Now you can use the annotation layer to create the masks.
In ArcToolbox, the Cartography Toolbox contains the masking tools. To create masks for the annotation, use the Feature Outline Masks tool which creates mask polygons at a specified distance and shape around the features in the input layer.
-
Open ArcToolbox.
- Open the Cartography toolset.
- Double click the Feature Outline Masks tool to open it.
- Click the Input Layer dropdown arrow and select the annotation layer you created.
- Type a name and specify the location for the Output Feature Class.
- If you’re using an annotation layer, the reference scale will be automatically set.
- You can use the Import option when you set the coordinate system by selecting a layer with the coordinate system you are using for your map – in this example we imported the NAD 27 UTM Zone 10N coordinate system that was already specified for the contours__indexAnno layer.
- Type a value in the Margin parameter – in this example, we used two points.
- Click the Mask Kind dropdown arrow to select an outline method – in this example, we used Convex Hull, which represents the shape of the text, but not the internal holes. This is the recommended method.
- Click OK.
- For variable-depth masking to work, the mask layer must be in the data frame, so leave it in the table of contents. But it does not need to be visible, so turn off the visibility for that layer.
Using the Advanced Drawing Options > Masking settings
Now use the Advanced Drawing Options to set the display to specify which layers the masks will affect to make the map more readable.
- Right-click the data frame in the table of contents and click Advanced Drawing Options.
- Check the option to Draw using masking options specified below. You would uncheck this if you wanted to turn masking off.
- Click the layer that should be used as a mask in the Masking Layers list – this is the annotation mask layer you created using the Feature Outline Masks tool.
- Check the layers you want affected by the mask – in this example those are the index and intermediate Contours.
- Click OK.
The contour labels are now more legible because the index contours directly under the labels and any intermediate contours within two points of the masks break where the annotation masks are located.
In this blog entry, we showed you how to use the Feature Outline Mask tool and Advanced Drawing Options for Masking to make the contour lines and labels both more distinguishable. You can also use this technique for other features and labels on your map that create graphic conflicts. Use the Masking tools to create masks for the layers you want to show over other layers and use the Advanced Drawing Tools > Masking options to set the layers that will be “hidden” by the masks.
Article Discussion: