AE开发 创建Feature后,需要进行拓扑检查

 

     在创建完Feature并赋予Geometry后,需要对当前的Feature.shape进行拓扑检查。利用 ITopologicalOperator接口中的IsSimple属性进行拓扑检查。

检查失败后则需要用ITopologicalOperator接口中的Simplify()进行拓扑处理。ITopologicalOperator接口官方文档如下:

http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#/ITopologicalOperator_Interface/002m000003t6000000/

     经过处理后的Feature才可以与其他Feature进行合并和分割操作。

     示例代码: 

1  if (!(feature.Shape as ITopologicalOperator).IsSimple)
2      {
3        (feature.Shape as ITopologicalOperator).Simplify();
4      }

 

posted @ 2015-03-25 17:24  一根傻烟  阅读(602)  评论(0编辑  收藏  举报