60楼#
发布于:2005-11-18 13:37
<DIV class=quote><B>以下是引用<I>liulf</I>在2005-10-14 16:44:53的发言:</B><BR>
<P>请问怎样实现几何要素的剪切,我已经焦头烂额了,iselection不行,是arcgis的bug.</P></DIV> <P>下面这个帮助里的例子可以实现 <H1>IFeatureEdit Example</H1><PRE><PRE><PRE><P>The following VBA code fragment illustrates how to implement the appropriate calling behavior on multiple features within a set..</P><CODE><PRE> </PRE><PRE>‘Assume pSet (ISet) and pMoveVector (ILine) already exist. Dim pUnknown As IUnknown, pFeatureEdit As IFeatureEdit Set pUnknown = pSet.Next</PRE><PRE>Do While pUnknown Is Not Nothing Set pFeatureEdit = pUnknown pFeatureEdit.MoveSet pSet, pMoveVector Set pUnknown = pSet.Next Loop</CODE> </PRE><P>The following code is an example of one way you could split a selected polygon features by a polyline.<CODE></P><PRE> </PRE><PRE>Public Sub SplitFeatures(pSelectionSet As ISelectionSet, pPolyLine As IPolyline)</PRE><PRE>‘ open a feature cursor on the selected features that ‘ intersect the splitting geometry Dim pFeatCursor As IFeatureCursor Dim pSpatialFilter As ISpatialFilter Set pSpatialFilter = New SpatialFilter Set pSpatialFilter.Geometry = pPolyLine pSelectionSet.Search pSpatialFilter, True, pFeatCursor</PRE><PRE>‘ Clean up the splitting geometry ‘ This is necessary because, for polygons, IFeatureEdit::Split ‘ relies internally on ITopologicalOperator::Cut Dim pTopoOpo As ITopologicalOperator Set pTopoOpo = pPolyLine pTopoOpo.Simplify</PRE><PRE>‘ Loop through the features and split them Dim pFeature As IFeature Set pFeature = pFeatCursor.NextFeature</PRE><PRE>Do Until pFeature Is Nothing Dim pFeatureEdit As IFeatureEdit Set pFeatureEdit = pFeature pFeatureEdit.Split pPolyLine Set pFeature = pFeatCursor.NextFeature Loop</PRE><PRE>End Sub</PRE></CODE></PRE></PRE></PRE> |
|
|
61楼#
发布于:2005-11-22 17:55
太好了,
|
|
62楼#
发布于:2005-12-05 19:02
<P>好,不错!</P>
|
|
|
63楼#
发布于:2005-12-16 15:41
<img src="images/post/smile/dvbbs/em05.gif" /><img src="images/post/smile/dvbbs/em05.gif" />斑竹何不把ArcGISBook共享出来?也不至于copy如此麻烦!
|
|
64楼#
发布于:2005-12-18 09:50
<P>非常感谢,太难得的资料啊。</P>
|
|
65楼#
发布于:2006-01-06 14:22
<img src="images/post/smile/dvbbs/em02.gif" /><img src="images/post/smile/dvbbs/em02.gif" />
|
|
66楼#
发布于:2006-02-09 10:36
不错啊
|
|
67楼#
发布于:2006-02-16 23:20
<P>请问有画等值线的吗</P>
|
|
68楼#
发布于:2006-02-23 09:39
<P>这是一本教材里面的内容啊</P>
<P>《ArcGIS二次开发编程实例》超维空间信息技术有限公司 编著</P> <P>我这里有PDF版的 谁要的加我QQ 5711477</P> |
|
69楼#
发布于:2006-03-01 09:41
谢谢总统..好好学习
|
|