何熙颖
路人甲
路人甲
  • 注册日期2004-10-22
  • 发帖数71
  • QQ
  • 铜币439枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1372回复:0

关于ITopologicalOperator的Intersect空间操作

楼主#
更多 发布于:2007-04-28 10:10
<P>AE中ITopologicalOperator的接口,我基本都用过,不知道什么原因,总是遇到这样那样的问题。比如<a href="mk:@MSITStore:C:\Program%20Files\ArcGIS\DeveloperKit\Help\COM\VB\esriGeometry.chm::/ITopologicalOperator_Intersect.htm" target="_blank" ><STRONG>Intersect</STRONG></A>接口,我经常用到,但时常出现问题,例子如下:</P>
<P>    '获取线与面的相交部分</P>
<P>        。。。。。。。。。。。。。。</P>
<P>        Dim pIntersectPolyline As IPolyline</P>
<P>        Do While Not pFeature Is Nothing<BR>                Dim pIntersectTopo As ITopologicalOperator<BR>                pIntersectTopo = m_Geometry      'm_Geometry  为polygon型<BR>                pIntersectTopo.Simplify()  </P>
<P>             <FONT color=#f73809>   pIntersectPolyline = pIntersectTopo.Intersect(pFeature.Shape,          ESRI.ArcGIS.Geometry.esriGeometryDimension.esriGeometry1Dimension)</FONT></P>
<P>               ......................</P>
<P>                pFeature = pFeatureCursor.NextFeature<BR>          Loop</P>
<P>在红色一行出错,但不是所有时候出错,偶尔出一下子,估计问题出在m_Geometry。一般情况下m_Geometry采用polygon图层中的原有图形没有错,当m_Geometry选用的是我用自己做的一个功能绘的一个polygon时(已保存在polygon图层中),问题就出现了,提示是:</P>
<P align=center>HRESULT中的异常:0×80040218</P>
<P align=left>一个下午反反复复调试,改写程序,都没有用,实在搞不懂,请有高手帮帮忙,谢谢了!</P>
喜欢0 评分0
游客

返回顶部