Masking is a way of making portions of symbolized features invisible to improve the legibility of overlapping symbols or text. Feature geometry is not changed. It is only the symbology that is affected.
A common use for masking is to mask features around annotation to ensure the text remains readable. For example, in a hypsometric elevation map such as the one below, contour lines and text conflict. With masking, portions of the black contour lines are made invisible near the contour text to ensure it remains legible.
In this example, a polygon feature layer of small shapes that correspond with the placement of the annotation are used to mask the contour lines, visually breaking the line symbology. (The shapes, in white, were created by the Feature Outline Masks tool.) In the final image, the polygon mask feature layer is in the map but its visibility is off, so you don't see the mask polygons themselves.
If there was nothing else in the map other than the contour lines and the annotation, you could just add a white halo to the text symbol used for the annotation. But in a map such as this that has continuous hypsometric symbology below it, white halos would be unsuitable. Removing the visibility of pieces of the contour line symbols with masking is preferable.
There are three types of masking strategies:
- Layer masking—Polygon features in a mask layer are used to make visual holes in the symbols of the features in the selected layer in the map or scene. The example above where mask polygons make holes in contour line symbols is an example of layer masking.
- Advanced masking—This is layer masking, but with the refinement that the masking happens for only a subset of symbol layers in the symbols of the selected layer. For example, only the road casing (one stroke symbol layer) of a road line symbol is masked. The interior color of the road symbol (a second stroke symbol layer of the road line symbol) is not masked.
- Feature-level masking—Masking is handled uniquely per feature, as specified by a relationship class between the masking and the masked layers.
Note:
3D layers in a scene cannot be masked, but they can be used as masking layers.
Create a masking layer
Regardless of the strategy, masking relies on a polygon feature layer whose features contain the geometry to make the masked holes in the symbology of a feature layer. Any feature layer can be masked, but only polygon feature layers can be mask features. Any existing polygon layer can be used as a masking layer, or you can create a dedicated masking layer. Some geoprocessing tools that can be used to create polygon masking layers include the following:
- Feature Outline Masks—Creates polygons that can be used as masks at a specified distance and shape around symbolized input features.
- Intersecting Layers Masks—Creates polygons that can be used as masks at a specified shape and size at the intersection of two symbolized input layers.
- Cul-de-Sac Masks—Creates polygons that can be used as masks at unconnected line ends to smooth the transition of line connections.
- Create Overpass and Create Underpass—Identify feature conflicts, create mask polygon features, and set up relationships automatically for feature-level masking. Use an expression to work with a subset of features.
To create a masking layer using geoprocessing, follow these steps:
- On the Analysis tab, in the Geoprocessing group, click Tools .
- In the Geoprocessing pane, browse to Cartography Tools > Masking, and click the appropriate tool for your workflow to open it.
- Set the parameters and run the tool.
A polygon feature class suitable for masking is created and added to the map or scene.
The polygon feature layer containing the masks must remain in the map for masking to be present, but it is typically unchecked in the Contents pane so the mask geometry itself is not visible.
Use layer masking
Layer masking is the simplest form of masking. The polygon features of a mask layer are used to effectively make holes in the symbology of another feature layer, while leaving the geometry intact. A layer can be masked by more than one mask layer.
To mask a layer with the polygons of one or more mask layers, follow these steps:
- Ensure that masking is turned on for the map or scene.
- Highlight the layer to be masked in the Contents pane.
- On the Feature Layer tab, in the Drawing group, click Masking .
- On the drop-down menu, check one or more layers in the list that contain the mask polygons.
- To see the full visual effect of the masking, turn off the visibility of the mask polygon layers in the Contents pane.
Although the mask features themselves are not drawn, they must remain in the map or scene for the masking effect to persist.
Use advanced masking
Advanced masking is layer masking, with the refinement where the masking effect can happen on only some symbol layers of the symbols of the selected layer. For example, you can mask just the black highway casing of road symbols where it conflicts with text, but allow the lighter yellow center of the road to remain underneath. This ensures visual continuity of the roads while improving the legibility of the text .
Note:
You must enable symbol layer drawing on the layer to use advanced masking.
To use advanced masking to mask only certain symbol layers of the symbols of the selected layer, follow these steps:
- Ensure that masking is turned on for the map or scene.
- Ensure that symbol layer drawing is enabled for the layer to be masked.
- Highlight the feature layer to be masked to in the Contents pane.
- On the Feature Layer tab, in the Drawing group, click the Masking drop-down menu and click Advanced Masking.
- On the Advanced Masking dialog box, in the Mask sources check box list, check one or more polygon mask sources.
- In the Symbol layers list, each symbol layer in the feature layer to be masked is listed in symbol layer drawing order. Expand the groups as necessary to see thumbnail images of each symbol layer. Check the symbol layers to be masked. To follow the example above, check the road casing symbol layers to mask them but keep the road centers unchecked.
- Click OK to apply the mask to the symbol layer or layers.
- To see the full visual effect of the masking, turn off the visibility of the mask polygon layers in the Contents pane.
Although the mask features themselves are not drawn, they must remain in the map or scene for the masking effect to persist.
Turn masking on or off for the whole map
While authoring a map or scene that uses layer masking (or advanced layer masking), sometimes you want to temporarily disable the masking across the whole map to get a more complete view of your features or allow the map to redraw faster. You can turn masking on and off for the whole map or scene without disrupting the masking settings established for individual layers.
Note:
This setting does not apply to feature level masking.
To turn masking on or off in a map or scene, follow these steps:
- Right-click the name of the map or scene in the Contents pane.
- In the context menu, click Properties to open the map or scene Properties dialog box.
- On the map Properties dialog box, on the General tab, check Use masking.
- Alternatively, you can right-click a map in the Contents pane and click Masking to turn masking on or off.
A gray outline around the icon indicates that masking is currently on. Click Masking again to turn it off.
Use feature level masking
You can establish masking for individual features by setting a many-to-many relationship class between a masked layer and a masking polygon layer. The relationship class is used to link specific masking polygons to specific features to be masked. The mask polygons should be set as the origin in the relationship class. The features to be masked should be set as the destination in the relationship class. You can use an existing polygon feature class and create a many-to-many relationship class between it and the layer to be masked using the Create Relationship Class tool.
Alternatively, you can use geoprocessing to discover feature conflicts and build the masks and relationship class for you. Use the Create Overpass or Create Underpass tool to identify conflicts, generate the mask polygons, and set up relationships. You can edit the resulting masking polygons if necessary.
Once the polygon mask layer, the layer to be masked, and the relationship class is established between the two, you can set up feature level masking. To do so, follow these steps:
- Ensure that the polygon mask layer, the layer to be masked, and a many-to-many relationship class relating the two are all present in the Contents pane of the map.
- In the Contents pane, highlight the layer to be masked.
- On the Feature Layer tab, in the Drawing group, click Symbology to open the Symbology pane.
- Click the Advanced symbology options tab .
- Expand the Feature level masking heading, and check the relationship class to enable masking.
The masking polygons mask the features of the current layer.
- To see the full visual effect of the masking, turn off the visibility of the mask polygon layers in the Contents pane.
Although the mask features themselves are not drawn, they must remain in the map or scene for the masking effect to persist.
Note:
Feature level masking is not impacted when masking is turned on or off at the map level.