laptop and a wrench

Bug

For multipart polygons, Geometry.IsEqual() always returns false for the identical geometry.

Last Published: May 5, 2020 ArcGIS Runtime SDK
Bug ID Number BUG-000130341
SubmittedApril 23, 2020
Last ModifiedJune 5, 2024
Applies toArcGIS Runtime SDK
Version found100.7
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusNon-Reproducible

Additional Information

There is about a 2-meter difference in the rounding error when comparing the two JSON texts using WinMerge. For a more accurate comparison use the GeometryEngine.Equals() method. Refer to https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Geometry.GeometryEngine.Equals.html for more info. As mentioned in the API Reference, the IsEqual(Geometry) method provides the strictest comparison of two geometries to ensure that they are identical. For a slightly more relaxed comparison, such as in this case where there is a minor precision difference, use GeometryEngine.Equals. Adjusting tolerance can get the desired results. For example, in the reproducer JSON, using the GeometryEngine.Equals method and increasing the tolerance to 2.5 returns 'true' for geometry comparison.

Steps to Reproduce

Bug ID: BUG-000130341

Software:

  • ArcGIS Runtime SDK

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options