arcengine 线分割线
本段源码实在之前博主的基础上加以修改的
具体的分割方法见http://blog.csdn.net/hong_taizi/article/details/10161557
本人只在线分割线上做了递归处理线的焦点
/// <summary> /// 线分割线 /// </summary> /// <param name="feature">要素</param> /// <param name="point">交点</param> /// <param name="newFeatures">要素集,保存分割后的要素</param> /// <param name="index">交点集索引</param> private void SplitPolylineByLine(IFeature feature, IPoint point, List<IFeature> newFeatures, int index) { while (pPointCol.PointCount > 0) { pPointCol.RemovePoints(index, 1); IFeatureEdit featEdit = feature as IFeatureEdit; ISet pointSet = featEdit.Split(point); pointSet.Reset(); IFeature splitFea = pointSet.Next() as IFeature; while (splitFea != null) { bool contain = false; for (int i = 0; i < pPointCol.PointCount; i++) { IRelationalOperator relationalOperator = splitFea.Shape as IRelationalOperator; if (relationalOperator.Contains(pPointCol.get_Point(i))) { SplitPolylineByLine(splitFea, pPointCol.get_Point(i), newFeatures, i); contain = true; break; } } if (!contain) { splitFea.Store(); newFeatures.Add(splitFea as IFeature); } splitFea = pointSet.Next() as IFeature; } } }
转载自:https://blog.csdn.net/as862214582/article/details/47809143