Method Equals
Equals(Geometry, Double)
Checks if two geometries are approximately same, within some tolerance.
Declaration
public bool Equals(Geometry geometryB, double tolerance)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geometryB | The second geometry. |
Double | tolerance | The tolerance. |
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
This function performs a lightweight comparison of two geometries, such as might be useful when writing test code. It
uses the tolerance to compare each of x, y, and any other values the geometries possess (such as z or m) independently
in the manner: abs(value1 - value2) <= tolerance. Returns true
if the difference of each is within the tolerance and
all other properties of the geometries are exactly equal (spatial reference, vertex count, etc). A single tolerance is
used even if the units for the horizontal coordinates and other values differ, e.g. horizontal coordinates in degrees and
vertical coordinates in meters. This function does not respect modular arithmetic of spatial references which wrap
around, so longitudes of -180 and +180 degrees are considered to differ by 360 degrees.
To test for topological equality, use relational operators provided by GeometryEngine.
See Also
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.1 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.1 - 100.15 |
Xamarin.iOS | 100.1 - 100.15 |
UWP | 100.1 - 100.15 |