|
阅读:2024回复:5
在AO中怎么可以裁剪图层?
请教大家,现有一个图层和一个范围(extent),怎么可以用这个范围来裁剪图层,谢谢,
|
|
|
|
1楼#
发布于:2004-09-17 16:37
<P>顶~</P>
|
|
|
2楼#
发布于:2004-09-17 11:07
<P>同样是在arcscripts.esri.com 找的一个例子,估计也是国人的.我没看,</P><P>Summary
Function: Clip all layers in current window with the first layer. Purpose: When you want to clip many layers with the same clip layer at one time. For instance, you want to extract data of your county from many state shape files. Then you may add your county boundary file as first layer and all other state files. Use this tool to clip them all at once. </P><P>Author: Lihe Wang</P><P>download url:</P><P>hxxp://arcscripts.esri.com/data/AS13040.zip</P> |
|
|
|
3楼#
发布于:2004-09-16 18:09
<P><b>Clip the features of a layer</b></P><P><b>这个例子也可以看下.</b></P>
|
|
|
|
4楼#
发布于:2004-09-16 18:06
<P>Sub ClipMapWithGraphic()
Dim pMxDocument As IMxDocument Dim pMap As IMap Dim pViewManager As IViewManager Dim pEnumElement As IEnumElement Dim pElement As IElement Dim pActiveView As IActiveView Dim pBorder As IBorder Set pMxDocument = Application.Document Set pMap = pMxDocument.FocusMap Set pViewManager = pMap 'QI Set pEnumElement = pViewManager.ElementSelection pEnumElement.Reset Set pElement = pEnumElement.Next If pElement Is Nothing Then MsgBox "No element selected" Exit Sub End If If pElement.Geometry.GeometryType = esriGeometryPolygon Then Set pBorder = New SymbolBorder 'Use default line symbol pMap.ClipGeometry = pElement.Geometry pMap.ClipBorder = pBorder Set pActiveView = pMap pActiveView.Refresh End If End Sub</P><P>使用mapcontrol的话 可以借鉴一下.</P><P>这部份代码相应改一下</P><P>Set pMxDocument = Application.Document Set pMap = pMxDocument.FocusMap 这个只是显示上有剪载效果,哈..</P> |
|
|
|
5楼#
发布于:2004-09-16 17:43
<P>以前看到一个叠加分析的例子,通过两个多边形图层来完成图层的求加,求减,求补操作,我想可以把一个范围保存成一个多边形图层,然后用这个多边形图层减另外一个图层.</P><P>试一下.</P>
|
|
|