阅读:1803回复:1
关于拓扑关系中clip方法的使用
我画了两个相互相交的元素,然后想用如下代码实现clip,可执行下来也不报错,但也没有一点效果<BR>IGraphicsContainer gc=(IGraphicsContainer)this.axMapControl1.Map;<BR>IGraphicsContainerSelect gcs=(IGraphicsContainerSelect)gc;<BR>IFeatureSelection featureselect=(IFeatureSelection)this.axMapControl1.Map.get_Layer(0);<BR>IFeatureLayer fc=(IFeatureLayer)this.axMapControl1.get_Layer(0);<BR>IPolygon polygon =new PolygonClass();<BR>ESRI.ArcGIS.Carto.IElement element = null;<BR>ESRI.ArcGIS.Carto.IElement element2 = null;<BR>for(int i=0;i<gcs.ElementSelectionCount;i++)<BR>{<BR>if(i==0)<BR>{<BR>element = gcs.SelectedElement(i);<BR>}<BR>if(i==1)<BR>{<BR>element2 = gcs.SelectedElement(i);<BR>}<BR>}<BR>ESRI.ArcGIS.Geometry.IEnvelope pEnvelope = element.Geometry.Envelope;<BR>ITopologicalOperator pTopologicalOperator=(ITopologicalOperator)element2.Geometry;<BR>pTopologicalOperator.Clip(pEnvelope);<BR>axMapControl1.ActiveView.Refresh();
|
|
1楼#
发布于:2006-12-28 09:20
<P>高人都上哪儿去了,</P>
<P>自已顶一下!!!!!!!!</P> |
|