问题:进行拓扑运算(ITopologicalOperator.SymmetricDifference)的时候报错“异常来自 HRESULT:0x80040218”

解决方案:经网上查阅资料,发现是输入图形未经简化处理所致。对于进行拓扑运算的图形,都要进行Simplify处理。完善代码如下:

1                         ITopologicalOperator topoOpr = bigPolygon as ITopologicalOperator;
2                         topoOpr.Simplify();
3                         (smallPolygon as ITopologicalOperator).Simplify();
4                         IPolygon ringpoly = topoOpr.SymmetricDifference(smallPolygon as IGeometry) as IPolygon;

参考:http://gis-conquer.blog.sohu.com/244181846.html

相关文章:

  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2022-01-17
  • 2022-02-13
猜你喜欢
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-08-30
相关资源
相似解决方案