예제 #1
0
        public static System.Collections.Generic.List <IFeature> Split(IFeatureSelection ifeatureSelection_0,
                                                                       IPolyline ipolyline_0)
        {
            ICursor cursor;

            ifeatureSelection_0.SelectionSet.Search(null, false, out cursor);
            IFeature feature = cursor.NextRow() as IFeature;

            ComReleaser.ReleaseCOMObject(cursor);
            System.Collections.Generic.List <IFeature> result = new System.Collections.Generic.List <IFeature>();
            if (feature != null)
            {
                result = ZDEditTools.Split(feature, ipolyline_0);
            }
            return(result);
        }
예제 #2
0
        public static System.Collections.Generic.List <IFeature> Split(IFeatureClass ifeatureClass_0,
                                                                       IPolyline ipolyline_0)
        {
            IFeatureCursor featureCursor = ifeatureClass_0.Search(new SpatialFilter
            {
                Geometry   = ipolyline_0,
                SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects
            }, false);
            IFeature feature = featureCursor.NextFeature();

            System.Collections.Generic.List <IFeature> list = new System.Collections.Generic.List <IFeature>();
            while (feature != null)
            {
                System.Collections.Generic.List <IFeature> list2 = ZDEditTools.Split(feature, ipolyline_0);
                if (list2.Count > 0)
                {
                    list.AddRange(list2);
                }
                feature = featureCursor.NextFeature();
            }
            ComReleaser.ReleaseCOMObject(featureCursor);
            return(list);
        }