Show / Hide Table of Contents

Method IsEqual

IsEqual(Geometry)

Compares two Polyline for equality. This will check for a matching SpatialReference and the content of Parts match. The order of parts must match too.

Declaration
public override bool IsEqual(Geometry other)
Parameters
Type Name Description
Geometry other

A geometry to test for equality.

Returns
Type Description
Boolean

Value to indicate if the two geometries are equal.

Overrides
Geometry.IsEqual(Geometry)
Remarks

The various geometry IsEqual Methods (i.e. IsEqual(Geometry), IsEqual(Geometry), IsEqual(Geometry), IsEqual(Segment), IsEqual(Geometry), IsEqual(Geometry), IsEqual(Geometry), IsEqual(Segment)) provide the most strict comparison of two geometries to ensure they are equal (aka. identical). You can also use the Equals(Geometry, Geometry) Method but the test for ensuring that two geometries are equal (aka. identical) is not quite as strict. The following table provides a comparison of the geometry comparison options:

geometryA.IsEqual(geometryB) GeometryEngine.Equals(geometryA,geometryB)
Type Type
Shape Shape
Orientation Orientation
Order of Coordinates --

In a nutshell, if you need to ensure that the 'Order of Coordinates' that comprise your geometries are exactly the same, use the various geometry IsEqual Methods.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.1
.NET 6.0100.13 - 200.1
.NET 6.0 Windows100.13 - 200.1
.NET 6.0 Android200.0 - 200.1
.NET 6.0 iOS200.0 - 200.1
.NET Framework100.0 - 200.1
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.15
iOS100.0 - 100.15
UWP100.0 - 200.1
In This Article
Back to top Copyright © 2022 Esri.