以前得到的结果老是某一个,用下面的方法就可以获取合并后的结果

IGeometry pUnionGeo = null;
var bFirst = true;
foreach (IGeometry pGeo in pGeometrys)
{
if (pGeo != null && !pGeo.IsEmpty)
{
//RepairSelfIntersection(pGeo);
if (bFirst)
{
pUnionGeo = pGeo;
bFirst = false;
}
else
{
pUnionGeo = (pUnionGeo as ITopologicalOperator).Union(pGeo);
}
}
}
return pUnionGeo;

相关文章:

  • 2021-07-08
  • 2021-08-18
猜你喜欢
  • 2021-10-18
  • 2021-12-23
  • 2021-07-25
  • 2022-01-14
相关资源
相似解决方案