内容发布更新时间 : 2025/7/10 18:36:50星期一 下面是文章的全部内容请认真阅读。
注意!!!一般情况设置为True,来控制倍数的放大
Expand scales thesizeoftheEnvelope. IfasRatio =FALSE,theexpansionisadditive. XMin = XMin - dx YMin = YMin - dy XMax = XMax +dx YMax = YMax +dy
If asRatio = TRUE,theexpansionismultiplicative. XMin = (XMin - dx*Width)/2 YMin = (YMin - dy*Height)/2 XMax = (XMax +dx*Width)/2 YMax = (YMax +dy*Height)/2
The Envelope remainscenteredatthesameposition.
IEnvelope接口的第十个方法Offset (X, Y)(方法,将已有的一个边框的按照输入参数的大小来进行水平竖直的移动)
例子代码:
Private Sub btnOffset_Click() m_pEnveLope.Offset10,20 update_props
End Sub 注意!!!
The new positionoftheEnvelopeisasfollows: newXMin = old XMin+X newYMin =oldYMin+Y newXMax =oldXMax+X newYMax =oldYMax+Y
11. 关于IFeature接口(esriGeoDatabase) IFeature接口的第一个属性Class(只读)
IFeature接口的第二个方法Delete(方法,删除该行。因为一个Feature在表格中对应的就是一行数据,删除该行就能相应的删除这个Feature)
IFeature接口的第三个属性Extent(只读,获取该Feature要素在地图上的一个矩形范围,返回值为IEnvelope类型) IFeature接口的第四个属性FeatureType(只读,获取该Feature要素的要素类型,返回值为枚举类型的esriFeatureType)
IFeature接口的第五个属性Fields(只读,获取该Feature要素的字段集合,返回值为IFields类型)
IFeature接口的第六个属性Shape(读写,获取该Feature要素的图形,返回值为IGeometry类型,或者各种实体化的类型,如IPolyline)
IFeature接口的第七个属性ShapeCopy(只读,克隆该Feature要素的几何图形,返回值为IGeometry类型) IFeature 接口的第八个方法Store(方法,保存该行。) 此属性可用于对Feature要素的几何图形进行操作,步骤如下:
用IFeature.ShapeCopy方法获取一个已经存在的Geometry,或者新建一个Geometry 对Geometry进行操作
通过IFeature.Shape属性将Geometry写入 通过IFeature.Store方法保存该Feature要素
例子代码:
Dim pFeature AsIFeature Dim pGeo AsIGeometry Set pGeo = pFeature.ShapeCopy 'Change the shape pFeature.Shape =pGeo pFeature.Store
IFeature接口的第九个属性Value(读写,利用字段的索引进行对该要素该字段的值的读写) 注意,索引Index是从0开始的。 object.Value(Index )