边界套合修复

核心代码

IPoint point1 = new PointClass();

var DistanceAlongCurve = 0.0001;
var distanceFromCurve = 0.0001;
bool bRightSide = true;
polyline.QueryPointAndDistance(esriSegmentExtension.esriNoExtension, point.Value, false, point1, ref DistanceAlongCurve, ref distanceFromCurve, bRightSide);
var distance = Math.Sqrt((point.Value.X - point1.X) * (point.Value.X - point1.X) + (point.Value.Y - point1.Y) * (point.Value.Y - point1.Y));
if (distance > 0.1)
continue;
IPointCollection points = geometry as IPointCollection;
points.UpdatePoint(point.Key, point1);

posted @ 2024-03-29 14:51  小丫么小西瓜  阅读(5)  评论(0编辑  收藏  举报