laptop and a wrench

Bogue

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

Dernière publication: May 5, 2020 ArcGIS Runtime SDK
Numéro d’ID de bogue BUG-000130341
EnvoiApril 23, 2020
Dernière modificationJune 5, 2024
S’applique àArcGIS Runtime SDK
Version trouvée100.7
Système d’exploitationWindows OS
Version du système d’exploitation10.0 64 Bit
StatutNon-Reproducible

Informations supplémentaires

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.

Étapes pour reproduire

ID de bogue: BUG-000130341

Logiciel:

  • ArcGIS Runtime SDK

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement