Show / Hide Table of Contents

Method SymmetricDifference

SymmetricDifference(Geometry, Geometry)

Performs the Symmetric difference operation on the two geometries.

Declaration
public static Geometry SymmetricDifference(this Geometry geometry1, Geometry geometry2)
Parameters
Type Name Description
Geometry geometry1

is one of the Geometry instances in the XOR operation.

Geometry geometry2

is one of the Geometry instances in the XOR operation.

Returns
Type Description
Geometry

Returns the result of the symmetric difference. The result has the higher of dimensions of the two geometries.

Remarks

The "symmetric" difference means that you would be interested in obtaining those parts of the two input geometries that do not overlap.

The following is a visual illustration of two polygon geometries and how the output result would be from the GeometryEngine.SymmetricDifference operation:

GeometryEngine.SymmetricDifference visual example.

If you desire to perform a more atomic-level difference operation where the spatial subtraction of two input geometries might look different if the order of the geometires were switched, consider using the Difference(Geometry, Geometry) method instead.

See Also
Difference(Geometry, Geometry)

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7
In This Article
Back to top Copyright © 2022 Esri.