shixcn
外卖仔
外卖仔
  • 注册日期2003-11-02
  • 发帖数73
  • QQ
  • 铜币180枚
  • 威望0点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
阅读:3663回复:7

求助 :在AE中如何实现Topology工具条中的Construct Feature命令?

楼主#
更多 发布于:2005-09-02 20:24
<P>      那位知道在AE中如何实现在Topology工具条中的Construct Feature命令,我现在在做数据处理 有好多线组成的数据集,想通过Topology工具条中的Construct Feature一次性全部构成面,我知道在ArcMap可以做到这一点,但是真正AE中用那个接口可以做到呢?那位知道可否告知一二 ,先谢谢了</P>
<P><BR><BR></P>
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15951
  • QQ
  • 铜币25345枚
  • 威望15368点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2005-09-03 15:57
<P>在帮助里查找下</P>
<P>Topology</P>
<P>TopologyGraph</P>
<P>等几个接口</P>
<P>你可以看看这个工具</P>
<P><a href="http://www.ian-ko.com/ET_GeoWizards/gw_NoRestrictions.htm" target="_blank" >http://www.ian-ko.com/ET_GeoWizards/gw_NoRestrictions.htm</A></P>
GIS麦田守望者,期待与您交流。
举报 回复(0) 喜欢(0)     评分
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15951
  • QQ
  • 铜币25345枚
  • 威望15368点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
2楼#
发布于:2005-09-03 16:01
<PRE>Public Sub CreatePolygonFromPolylines()
  
  On Error GoTo ErrorHandler
  Dim pUID As New UID
  pUID = "esriCore.Editor"
  
  Dim pEditor As IEditor
  Set pEditor = Application.FindExtensionByCLSID(pUID)
  
  Dim pEditLayers As IEditLayers
  Set pEditLayers = pEditor 'QI
  
  Dim pActiveView As IActiveView
  Set pActiveView = pEditor.Map
  
   'Check that at least one feature is selected
  'and ensure the target layer is a polygon layer
  If pEditor.SelectionCount = 0 Then Exit Sub
  If Not pEditLayers.CurrentLayer.FeatureClass.ShapeType = esriGeometryPolygon Then Exit Sub
  
  'Start an edit operation
  pEditor.StartOperation
  
  'Get the Editor's feature selection
  Dim pEnumFeature As IEnumFeature
  Set pEnumFeature = pEditor.EditSelection
  pEnumFeature.Reset
  
  Dim pFeature As IFeature
  Set pFeature = pEnumFeature.Next
  
  'Union all the polylines together
  Dim pTempPolyline As ITopologicalOperator
  Set pTempPolyline = New Polyline
  Do While Not pFeature Is Nothing
    If pFeature.Shape.GeometryType = esriGeometryPolyline Then
     Set pTempPolyline = pTempPolyline.Union(pFeature.Shape)
    
    End If
      Set pFeature = pEnumFeature.Next
  Loop

  'Create a new polygon and call Close to ensure a closed polygon
 
  Dim pPolygonPointColl As IPointCollection
  Set pPolygonPointColl = New Polygon
  pPolygonPointColl.AddPointCollection pTempPolyline
  
  Dim pPolygon As IPolygon
  Set pPolygon = pPolygonPointColl 'QI
  pPolygon.Close
  
  'Create a new feature in the target layer
  Dim pNewFeature As IFeature
  Set pNewFeature = pEditLayers.CurrentLayer.FeatureClass.CreateFeature
  Set pNewFeature.Shape = pPolygon
  pNewFeature.Store
  
  'Complete the edit operation
  pEditor.StopOperation "Create Polygon"
  
  'Flag the area of the new feature for refreshing
  pActiveView.PartialRefresh esriViewGeography, Nothing, pPolygon.Envelope
  
  Exit Sub 'Exit to avoid error handler
  
ErrorHandler:
  pEditor.AbortOperation
End Sub</PRE>
GIS麦田守望者,期待与您交流。
举报 回复(0) 喜欢(0)     评分
shixcn
外卖仔
外卖仔
  • 注册日期2003-11-02
  • 发帖数73
  • QQ
  • 铜币180枚
  • 威望0点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
3楼#
发布于:2005-09-03 17:57
你这个好像只是生成一个多边形,ArcMAp里Topology工具条中的Construct Feature命令可以创建多个polygon<img src="images/post/smile/dvbbs/em02.gif" />
举报 回复(0) 喜欢(0)     评分
shixcn
外卖仔
外卖仔
  • 注册日期2003-11-02
  • 发帖数73
  • QQ
  • 铜币180枚
  • 威望0点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
4楼#
发布于:2005-09-03 18:08
而且他那个工具将可以组成多边形的线组合成多边形,不能组合的仍然剩下,但是你这个好像是所有的线组成一个多边形哦<img src="images/post/smile/dvbbs/em08.gif" /><br><br>
[此贴子已经被作者于2005-9-3 18:48:04编辑过]
举报 回复(0) 喜欢(0)     评分
shixcn
外卖仔
外卖仔
  • 注册日期2003-11-02
  • 发帖数73
  • QQ
  • 铜币180枚
  • 威望0点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
5楼#
发布于:2005-09-03 18:53
<P>前一个图是用arcmap提供的工具,后面一个是用3楼提供的程序,用的是同一套数据</P>
举报 回复(0) 喜欢(0)     评分
shixcn
外卖仔
外卖仔
  • 注册日期2003-11-02
  • 发帖数73
  • QQ
  • 铜币180枚
  • 威望0点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
6楼#
发布于:2005-09-10 18:10
<P>哪位知道阿?</P>
举报 回复(0) 喜欢(0)     评分
echodjx
路人甲
路人甲
  • 注册日期2004-06-06
  • 发帖数37
  • QQ
  • 铜币29枚
  • 威望0点
  • 贡献值0点
  • 银元0个
7楼#
发布于:2005-10-13 08:52
<P>等待高手出现……</P>
举报 回复(0) 喜欢(0)     评分
游客

返回顶部