Select to view content in your preferred language

IsSelfIntersecting property not working

1241
4
06-26-2020 05:59 AM
JamesS1
Regular Contributor

I am using the SketchViewModel to draw a graphic. When I draw the polygon as self intersecting, most of the time, the isSelfIntersecting property on the geometry comes back as false. Sometimes, but infrequently, the same shape comes back as true. Is this a bug? Any other way to determine self intersection?

Also, I am not sure why there are two arrays for the rings array. Any thoughts on this?

This is using the Esri JavaScript API 4.11

4 Replies
EricDurbin
Emerging Contributor

I am also experiencing this bug.

0 Kudos
JohnGrayson
Esri Regular Contributor

Do you have a very simple codepen showing the issue?

0 Kudos
JohnGrayson
Esri Regular Contributor

If you follow the vertices around in order you'll notice that they geometry does not self-intersect.  Here's a codepen where we number the vertices so you can understand why this geometry doesn't self-intersect: https://codepen.io/john-grayson/pen/gOmaObZ

 

0 Kudos