zoukankan      html  css  js  c++  java
  • 裁切后得到有宽度环的类型确定

    问题:

    使用ITopologicalOperator.SymmetricDifference()对相互覆盖的两个面A和B(A>B)进行拓扑运算,得到一个有宽度的环C(如下图所示)。但是

    (1)C的几何类型不知如何确定。

    (2)由于(1)的不确定导致不知该用什么类型的集合管理环C这种类型对象。使用ITopologicalOperator.SymmetricDifference()得到的是一个IGeometry类型的对象K,但使用IGeometryCollection pGeoCollection = new PolygonClass()集合无法加载这个IGeometry类型的对象K(参数类型错误)。

    解决思路:

    (1)这个有宽度的环C类型应为面即IPolygon。

    (2)当使用PolygonClass实现的IGeometryCollection 去加载要素时,要素对象应为IRing类型(在arcgis的在线帮助文档中有如下介绍Use the IGeometryCollection and ISegmentCollection interfaces to access rings and segments directly.)所以加载对象K时会报错(K为更高层次的IPolygon)。如果非要用IGeometryCollection 去加载,则需使用其AddGeometryCollection(IPolygon as IGeometryCollection)方法,但这样会导致将对象K拆散为两个环,从而丢失K这个整体。最后使用 List<IPolygon> polygonList = new List<IPolygon>()进行管理,可以满足需求。

  • 相关阅读:
    iOS_SN_地图的使用(3)
    iOS_SN_地图的使用(2)
    iOS_SN_百度地图基本使用(1)
    iOS_SN_CoreData(二)
    iOS_SN_CoreDate(一)封装使用
    iOS_SN_UITableView的优化
    阿里云 单表备份 恢复
    svn 彻底删除文件、文件夹
    @去除
    服务器安全保护
  • 原文地址:https://www.cnblogs.com/lettet/p/4562878.html
Copyright © 2011-2022 走看看