Intersecting Layers Masks (Cartography)

Summary

Creates masking polygons at a specified shape and size at the intersection of two symbolized input layers -- the Masking layer and the Masked layer.

Usage

Syntax

IntersectingLayersMasks_cartography (masking_layer, masked_layer, output_fc, reference_scale, spatial_reference, margin, method, mask_for_non_placed_anno, {attributes})
ParameterExplanationData Type
masking_layer

The symbolized input layer, which will be intersected with the masked layer to create masking polygons. This is the layer that will be more prominently displayed when masking is applied to the masked layer.

Layer
masked_layer

The symbolized input layer to be masked. This is the layer that will be obscured by the masking polygons.

Layer
output_fc

The feature class that will contain the mask features.

Feature Class
reference_scale

The reference scale used for calculating the masking geometry when masks are specified in page units. This is typically the reference scale of the map.

Double
spatial_reference

The spatial reference for which the masking polygons will be created. This is not the spatial reference that will be assigned to the output feature class. It is the spatial reference of the map in which the masking polygons will be used since the position of symbology may change when features are projected.

Spatial Reference
margin

The space in page units surrounding the symbolized input features used to create the mask polygon. Typically, masking polygons are created with a small margin around the symbol to improve visual appearance. Margin values are specified in either page units or map units. Most of the time you will want to specify your margin distance value in page units.

Margin value units are interpreted differently depending on which units you choose. If you choose points, inches, millimeters, or centimeters, then masks are created using the margin distance as calculated in page space (you can think of the margin as a distance measured on the paper). The reference scale parameter value is accounted for in this calculation.

If you choose any other units for your margin, then masks are created using the margin distance as calculated in map space (you can think of the margin as a real-world distance measure on the earth). Also, in this case, the reference scale parameter value is not used as part of the calculation.

Linear unit
method

The type of masking geometry created. There are four types:

  • BOXA polygon representing the extent of the symbolized feature.
  • CONVEX_HULLThe convex hull of the symbolized geometry of the feature. This is the default.
  • EXACT_SIMPLIFIEDA generalized polygon representing the exact shape of the symbolized feature. Polygons created with this method will have a significantly smaller number of vertices compared to polygons created with the EXACT method.
  • EXACTA polygon representing the exact shape of the symbolized feature.
String
mask_for_non_placed_anno

Specifies whether to create masks for unplaced annotation. This option is only used when masking geodatabase annotation layers.

  • ALL_FEATURESCreates masks for all the annotation features.
  • ONLY_PLACEDOnly creates masks for features with a status of placed.
String
attributes
(Optional)

Determines which attributes will be transferred from the input features to the output features.

  • ONLY_FIDOnly the FID field from the input features will be transferred to the output features. This is the default.
  • NO_FIDAll the attributes except the FID from the input features will be transferred to the output features.
  • ALLAll the attributes from the input features will be transferred to the output features.
String

Code Sample

IntersectingLayersMasks tool Example (Python Window)

The following Python window script demonstrates how to use the IntersectingLayersMasks tool in immediate mode.

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.IntersectingLayersMasks_cartography("C:/data/cartography.gdb/transportation/roads",
                                          "C:/data/cartography.gdb/transportation/railroads",
                                          "C:/data/cartography.gdb/transportation/ilm_polys",
                                          "25000", "", "5 meters", "EXACT_SIMPLIFIED", "", "ALL")
IntersectingLayersMasks tool Example (stand-alone Python script)

This stand-alone script shows an example of using the IntersectingLayersMasks tool.

# Name: IntersectingLayersMasks_standalone_script.py
# Description: Creates masking polygons at a specified shape and size at the intersections of symbolized features. 
 
# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"

# Set local variables
masking_layer = "C:/data/cartography.gdb/transportation/roads"
masked_layer = "C:/data/cartography.gdb/transportation/railroads"
outpuf_fc = "C:/data/cartography.gdb/transportation/ilm_polys"
reference_scale = "25000"
spatial_reference = ""
margin = "5 meters"
method = "EXACT_SIMPLIFIED"
mask_for_non_placed_anno = ""
attributes = "ALL"

# Execute Intersecting Layers Masks
arcpy.IntersectingLayersMasks_cartography(masking_layer, masked_layer, output_fc, reference_scale, spatial_reference, margin, method, mask_for_non_placed_anno, attributes)

Environments

Related Topics

Licensing Information

ArcView: No
ArcEditor: No
ArcInfo: Yes

11/11/2011