Symmetrical Difference (Analysis)

License Level:BasicStandardAdvanced

Summary

Features or portions of features in the input and update features that do not overlap will be written to the output feature class.

Illustration

Symmetrical Difference illustration

Usage

Syntax

SymDiff_analysis (in_features, update_features, out_feature_class, {join_attributes}, {cluster_tolerance})
ParameterExplanationData Type
in_features

The input feature class or layer.

Feature Layer
update_features

The update feature class or layer. Geometry type must be the same geometry type as the input feature class or layer.

Feature Layer
out_feature_class

The feature class to which the results will be written.

Feature Class
join_attributes
(Optional)

Determines which attributes will be transferred to the output feature class.

  • ALLAll the attributes from the input features and update features will be transferred to the output. This is the default.
  • NO_FIDAll the attributes except the FID input features and update features will be transferred to the output.
  • ONLY_FIDOnly the FID from the input features and update features will be transferred to the output.
String
cluster_tolerance
(Optional)

The minimum distance separating all feature coordinates (nodes and vertices) as well as the distance a coordinate can move in x or y (or both).

Linear unit

Code Sample

SymDiff example (Python window)

The following Python window script demonstrates how to use the SymDiff function in immediate mode:

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.SymDiff_analysis("climate.shp", "elevlt250.shp", "C:/output/symdiff.shp", "ALL", 0.001)
SymDiff example 2 (Stand-alone script)

The following stand-alone script demonstrates how to use the SymDiff function:

# Name: SymDiff_Example2.py
# Description: Create symmetrical difference between input and update features
 
# Import system modules
import arcpy
from arcpy import env
 
# Set environment settings
env.workspace = "C:/data"
 
# Set local variables
inFeatures = "climate.shp"
updateFeatures = "elevlt250.shp"
outFeatureClass = "C:/output/symdiff.shp"
clusterTolerance = 0.001
 
# Execute SymDiff
arcpy.SymDiff_analysis(inFeatures, updateFeatures, outFeatureClass, "ALL",
           clusterTolerance)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: No
ArcGIS for Desktop Advanced: Yes
3/3/2014