Skip To Content

Detect Graphic Conflict

Summary

Creates polygons where two or more symbolized features graphically conflict.

Illustration

Detect graphic quality

Usage

  • The tool assesses conflicts among symbols, not geometry. The input layer and the conflict layer can be the same.

  • Input layers must be symbolized. Input layers can include feature class annotation, including symbol substitution. Shapefile, coverage, and CAD layers are also acceptable inputs.

    The following inputs are not accepted by the tool: CAD, coverage, or VPF annotation, dimensions, charts, dot-density or proportional symbols, raster layers, network datasets, or 3D symbols.

  • The output feature class stores polygons, each representing an area of graphic conflict between a symbolized input feature and a symbolized conflict feature. The feature IDs associated with the two conflicting features are stored with the conflict polygon in the FID_<input_layer_name> and FID_<conflict_layer_name> fields. In the event that the conflict layer is the same as the input layer, the second field will be named FID_<input_layer_name>_1. If no graphic conflicts are found, the output feature class will be empty.

  • Use the Conflict Distance parameter to detect areas where input and conflict symbology is closer than a certain distance. Temporary buffers one-half the size of the conflict distance value are created around symbols. Conflict polygons will be generated anywhere these buffers overlap. When the conflict distance is zero, conflicts are detected anywhere that symbology itself actually overlaps; this is the default. The conflict calculation is based on a reference scale. The reference scale of the data frame containing the input layers is used, unless the Reference Scale environment setting has been set.

  • Use the Line Connection Allowance parameter to disregard symbol overlaps where line ends meet. This is useful if you use line symbol end caps to ensure that lines connect visually, but you don't want each instance detected as a conflict. The line connection allowance is in page units, related to the reference scale. It is equal to the radius of a circle, centered where lines join, within which graphic overlaps won't be detected; the default value is 1 point. Use a value that is at least one-half the line width of line symbols to disregard these connections. A value of zero means no allowance and will detect a conflict at each line join in this case. This parameter is only considered when the input layer and the conflict layer are identical.

  • This tool operates by assessing graphic conflicts of symbolized features. The symbology extent and the reference scale are considered in conjunction with one another. Run this tool only after you have finalized the appearance of your symbols, and ensure that the reference scale corresponds to the final intended output scale.

  • Processing large datasets may exceed memory limitations. In this case, consider processing input data—by partition—by identifying a relevant polygon feature class in the Cartographic Partitions environment setting. Portions of the data, defined by partition boundaries, will be processed sequentially. The output feature class of conflict polygons will be clipped at polygon edges.

Syntax

DetectGraphicConflict_cartography (in_features, conflict_features, out_feature_class, {conflict_distance}, {line_connection_allowance})
ParameterExplanationData Type
in_features

The input feature layer containing symbolized features. CAD, coverage, or VPF annotation, dimensions, charts, dot-density or proportional symbols, raster layers, network datasets, or 3D symbols are not acceptable inputs.

Layer
conflict_features

The feature layer containing symbolized features potentially in conflict with symbolized features in the input layer.

Layer
out_feature_class

The output feature class to be created to store conflict polygons. It cannot be one of the feature classes associated with the input layers.

Feature Class
conflict_distance
(Optional)

Sets the conflict distance. Temporary buffers one-half the size of the conflict distance value are created around symbols in both the input and conflict layers. Conflict polygons will be generated where these buffers overlap. Conflict distance is measured in page units (Points, Inches, Millimeters, Centimeters). If you enter a conflict distance in map units, it will be converted to page units using the reference scale. The default conflict distance is 0, where no buffers are created and only symbols that physically overlap one another are detected as conflicts.

Linear Unit
line_connection_allowance
(Optional)

The radius of a circle, centered where lines join, within which graphic overlaps won't be detected. This parameter is only considered when the input layer and the conflict layer are identical. Zero allowance will detect a conflict at each line join (if end caps are overlapping). Line connection allowance is calculated in page units (Points, Inches, Millimeters, Centimeters). If you enter a conflict distance in map units, it will be converted to page units using the reference scale. The value cannot be negative; the default value is 1 Point.

Linear Unit

Code sample

DetectGraphicConflict example 1 (Python window)

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

import arcpy
arcpy.env.workspace = "C:/data/carto.gdb/buildings"
arcpy.env.referenceScale = "50000"
arcpy.DetectGraphicConflict("footprints.lyr", 
                            "roads.lyr",
                            "C:/data/carto.gdb/buildings/dgc_polys",
                            "25 meters", 
                            "0 meters")
DetectGraphicConflict example 2 (stand-alone script)

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

# Name: DetectGraphicConflict_standalone_script.py
# Description: Detects graphic conflicts between
#              feature representations and stores
#              the overlaps as polygons in
#              the output feature class.
# Author: ESRI
 
# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data/cartography.gdb/buildings"
env.referenceScale = "50000"

# Set local variables
in_features = "footprints.lyr"
conflict_features = "roads.lyr"
out_feature_class = "C:/data/carto.gdb/buildings/dgc_polys"
conflict_distance = "25 meters"
line_connection_allowance = "0 meters"

# Execute Detect Graphic Conflict
arcpy.DetectGraphicConflict(in_features,
                            conflict_features,
                            out_feature_class,
                            conflict_distance,
                            line_connection_allowance)

Licensing information

  • ArcGIS Desktop Basic: No
  • ArcGIS Desktop Standard: No
  • ArcGIS Desktop Advanced: Yes

Related topics