1

how to get self intersection polygons in arcobjects could you please tell me how to get already i got self intersection for polyline features as per below code but it is not working on polygon features

if (intF.Shape.GeometryType == esriGeometryType.esriGeometryPolyline)
{
    IPolyline pline = intF.Shape as IPolyline;
    ITopologicalOperator3 ptopo = pline as ITopologicalOperator3;
    esriNonSimpleReasonEnum reasen = esriNonSimpleReasonEnum.esriNonSimpleSelfIntersections;
    ptopo.IsKnownSimple_2 = false;
    if (!ptopo.get_IsSimpleEx(out reasen))
    {
    if (reasen == esriNonSimpleReasonEnum.esriNonSimpleSelfIntersections)
    {
        selfinterfind = true;
    }
    }
    if (selfinterfind == true)
    {
    dt.Rows.Add(intF.OID, intF.Class.AliasName, "", "Self Intersection Found");
    }
}
3
  • 1
    Do you get an error message? what happens when it doesn't work for polygons? The ITopologialOperator3 is implemented for polygons so I don't see why it wouldn't work. Commented Jun 26, 2015 at 4:16
  • Hi Michael above code for self intersections for polyline this code i have using on self intersection polygons also is it work on polygons could you please tell me
    – SATYA
    Commented Jun 26, 2015 at 4:34
  • 2
    I see no reason why it wouldn't. If you have any problems self intersection is a boundary problem so turn your polygon into a polyline using ITopologicalOperator.Boundary and process as before (as a polyline). Commented Jun 26, 2015 at 4:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.