How to identify a self intersecting polygon
Does anyone know how to identify a user sketched polygon as being a self intersecting polygon using the Display Capture Geometry activity? I have a wokflow that allows users to sketch a polygon and appends it to a polygon feature class. If the polygon intersects itself, then the polygon fails to add, as self intersecting polygons are not allowed in a polygon feature class. Or is there is a way to create nodes at the intersecting points to create a multi-part polygon, that would work to? Any help would be nice.
Ken
-
Problem solved. The SimplifyTask activity does the trick. It fixes self intersecting geometries and allows them to add to a polygon feature class as a single polygon (self-intersecting). As a bonus, it also fixes counterclockwise drawn polygons which return negative areas using the areasAndLengths task activity and returns positive areas. So instead of capturing self-intersecting polygons, if that is the intent of the user is to create one, converting all user sketched polygons using the SimplifyTask activity at least forces the polygon to be legal.
0
Please sign in to leave a comment.
Comments
1 comment