I have discovered that some of the polygons that users are bringing into my system and creating a new object from have self intersections. I need to be able to first detect if a self intersection exists, and if it does then repair it automatically.
Is SimplifyAsFeature the best method to do this with for both detection and fixing?
protected Geometry FixSelfIntersections(Geometry inGeometry)
{
//I want to see if it has self intersections FIRST??
bool isSelfIntersecting = NEED TO FIND FIRST??;
//Fix if it has intersections
if (isSelfIntersecting)
{
inGeometry = GeometryEngine.Instance.SimplifyAsFeature(inGeometry, true);
}
return inGeometry;
}