/// <summary>
/// 判断点是否有压盖、重叠
/// </summary>
/// <param name="pLyrPath"></param>
/// <returns></returns>
public List<IFeature> PointOverlaySelf(string pLyrPath)
{
var fs = new List<IFeature>();
var fsPoints = ShpUtils.FS(pLyrPath);
var fsLines = ShpUtils.FS(pLyrPath);
for (var i = 0; i < fsPoints.Count; i++)
{
var fp = fsPoints[i];
IFeature theOverlayPoint = null;
for (var j = 0; j < fsLines.Count; j++)
{
if (j == i) continue;
var fl = fsLines[j];
var geomP = fp.Geometry;
var geoL = fl.Geometry;
if (geoL.Distance(geomP) == 0)
{
theOverlayPoint = fl;
break;
}
}
if (null != theOverlayPoint)
{
fs.Add(fp);
}
}
return fs;
}
其中:
ShpUtils.FS(pLyrPath);
是获取shp文件中的所有要素。