1

I have a self intersected polyline, how can I break it into 5 records stored in the same table using arcobjects? (splited by vertices and the intersection point)

Here is what I have got and it doesn't change a thing:

            IFeatureCursor mFeatureCursor = mFeatureClass.Search(null, false);
            IFeature lineFeature = mFeatureCursor.NextFeature();

            while (lineFeature != null)
            {
                IPolyline polyline = lineFeature.Shape as IPolyline;
                ITopologicalOperator2 topoop = polyline as ITopologicalOperator2;
                topoop.IsKnownSimple_2 = false;
                topoop.Simplify();  
                lineFeature = mFeatureCursor.NextFeature();
            } 

enter image description here

2
  • From what I understand about the itopo.simplify method, it should split your polyline at intersections into seperate 'paths' (in this case you would probably have 3 paths, not 5, as it won't be split at vertices, only intersections) but your geometry will still be a single polyline feature. Have you tried casting your polyline to a segment collection and then creating new polylines from the segments? I may not fully understand what you're trying to do though. EDIT: have a look at this: support.esri.com/es/knowledgebase/techarticles/detail/24483
    – pvdev
    Mar 4, 2014 at 9:31
  • @thehealingprocess: i'm trying to convert polylines to polygons,as the "feature to polygon" tool in arcmap.If the input polylines were not-simple,the output always goes problematic.I will have a look on the example you provide,thanks a lot!
    – l.z.lz
    Mar 5, 2014 at 2:48

0

Your Answer

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