欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

讲解和理解IFEature, IFeatureClass, IFeatureDataset等核心接口的作用与功能

最编程 2024-07-23 17:52:23
...

Feature指的是空间对象,它包含在一个feature class中,就如一行数据包含在一张表中,一个对象包含在一个对象类中一样。一个feature包含一个与之相关联的shape,其类型背定义在了feature class中。Shape对象可以是点、多点、多面、折线、面等(这些是Geometry库中的全部对象)。更多详情,参阅IGeometryDef接口。

值得注意的一点是所有的这些feature都有相同的几何类型(点、多点、折线、面、多面),比如标注这种feature,它的几何类型是面——由一个信封包裹着文字。

IFeature接口继承了IObjectIRow等接口,这两种接口的文档同样适用于IFeature接口。他们多出来的功能与这个featureshape相关,可以通过Shape属性进行获取和设置。相比于调用Value属性,这种调用方式将会更加方便。Shape属性是AO中联系几何图形和空间数据库对象模型重要纽带(?)。

ShapeCopy属性是featureshape属性的一个副本(cloned copy)。当对单个或多个featuregeometry进行改变时,使用ShapeCopy属性获得该featuregeometry的一个副本,对其进行改变,然后通过设定Shape属性的geometry来应用这个改变。



Features are spatial Objects. They are contained in a feature class in the same way that a row is contained in a table, and an object is contained in an object class. A feature has an associated shape, the type of which is defined by the feature class. The possible shape objects are Point, Multipoint, Multipatch, Polyline, and Polygon - these are all objects in the Geometry library. For more details, see the IGeometryDef interface.

One thing to note is that all features still have the same core geometry types of point, multipoint, polyline, polygon and multipatch; an example of this is the annotation feature, whose geometry type is polygon - this represents the envelope of the text element.

The IFeature interface extends the IObject and IRow interfaces, and as such, the documentation for those interfaces applies to this interface. The additional functionality relates to the features' shapes, accessed and set through the Shape property. This can be much more convenient than the alternative of using the Value property, since you don’t have to determine the index of the shape field. The Shape property is the main link in ArcObjects between the geometry and geodatabase object models.

The ShapeCopy property is a cloned copy of the feature’s Shape. When modifying the geometry of a feature or a set of features, use the ShapeCopy property to obtain a copy of the feature's geometry, perform the modification on the geometries, then apply the modifications by setting the geometry to the Shape property.

 

推荐阅读