ArcObjects Library Reference (GeoDatabase)  

IFeature Interface

Provides access to members that return and set properties of a feature.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Members

Description
Read-only property Class The Object Class for the row.
Method Delete Deletes the row.
Read-only property Extent The extent of the feature.
Read-only property FeatureType The type of the feature.
Read-only property Fields The fields Collection for this row buffer.
Read-only property HasOID Indicates if the row has an OID.
Read-only property OID The OID for the row.
Read/write property Shape A reference to the default shape for the feature.
Read-only property ShapeCopy A cloned copy of the default shape for the feature.
Method Store Stores the row.
Read-only property Table The Table for the row.
Read/write property Value The value of the field with the specified index.

Inherited Interfaces

Interfaces Description
IObject Provides access to the class the row belongs to.
IRow Provides access to members that return information about the row, the table the row belongs to and storing and deleting the row.
IRowBuffer Provides access to members used for getting and modifying a rows values and for getting the fields in the row.

CoClasses that implement IFeature

CoClasses and Classes Description
AnnotationFeature (esriCarto) An ESRI annotation feature.
ComplexEdgeFeature ESRI Complex edge geometric network feature object.
ComplexJunctionFeature ESRI Complex junction geometric network feature.
CoverageAnnotationFeature ESRI Coverage Annotation Feature.
DimensionFeature (esriCarto) ESRI Dimension Feature class.
Feature ESRI Feature.
GeocodedFeature (esriLocation) A feature created by a locator.
NALocationFeature (esriNetworkAnalyst) A network location which can be used like a feature or a row.
NALocationRangesFeature (esriNetworkAnalyst) A container of NALocationRanges which can be used like a feature or a row.
NATraversalResultElement (esriNetworkAnalyst) An individual element in a traversal result.
RasterCatalogItem Raster Catalog Feature Class.
RelQueryRow A row defined by a join of the datasets in a RelQueryTable.
SchematicInMemoryFeatureLink (esriSchematic) Schematic in memory feature link object.
SchematicInMemoryFeatureNode (esriSchematic) Schematic in memory feature node object.
SchematicInMemoryFeatureNodeOnLink (esriSchematic) Schematic in memory feature node on link object.
SchematicInMemoryFeatureSubLink (esriSchematic) Schematic in memory feature sublink object.
SchematicLink (esriSchematic) A schematic link object.
SchematicNode (esriSchematic) A schematic node object.
SchematicNodeOnLink (esriSchematic) A schematic node-on-link object.
SchematicSubLink (esriSchematic) A schematic sublink object.
SimpleEdgeFeature ESRI Geometric network simple edge feature object.
SimpleJunctionFeature ESRI Geometric network simple junction feature object.
TemporalFeature (esriTrackingAnalyst) Controls properties of the Temporal Feature object.
TopologyErrorFeature ESRI Topology Error Feature object.

Remarks

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 dont 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 features 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.

There are several Feature subclasses which can also be accessed using the IFeature interface. These include annotation, dimension, and network features.

See Also

IFeatureClass.LengthField Property | IFeatureClass.CreateFeatureBuffer Method | IFeatureClass.CreateFeature Method | IFeatureClass.AreaField Property | IFeatureClass.ShapeFieldName Property

.NET Snippets

Zoom to Selected Globe Features | Add Hyperlink | Flip Line Direction | Create Animation from Path | Create Graphic Buffers around Selected Features | Get First Feature from Point Search in GeoFeatureLayer |

.NET Samples

Add-in custom editor extension (Code Files: ValidateFeaturesExtension) | Buffer snap agent (Code Files: BufferSnap) | Calculate area geoprocessing function tool (Code Files: CalculateAreaFunction) | Convert part to feature command (Code Files: ConvertPart) | Create camera flyby from path (Code Files: frmCameraPath) | Curve conversion add-in (Code Files: CurveConversionCmd CurveConversionDockWin) | Custom reshape polyline edit task (Code Files: ReshapePolylineEditTask) | Cut polygons without selection edit task (Code Files: CutPolygonsWithoutSelectionEditTask) | Displaying MOLE symbology with the GlobeControl (Code Files: MainForm) | Editing using a custom form (Code Files: EditorForm) | Executing geoprocessing tools in the background (Code Files: RunGPForm) | Extending the replication synchronization process (Code Files: RasterSyncWorkspaceExtension) | Implementing an XML builder external component (Code Files: XMLDocImpl) | Implementing associations between GIS features and schematic features (Code Files: ElementFeatureAssociation) | Implementing extended criteria for some predefined schematic rules (Code Files: CollapseRelatedElts ExpandLinks PlantOnCableDiameter PlantWithoutEquipment) | Import signposts (Code Files: ImportDynamapSignsFunction ImportMultiNetSignsFunction ImportNavStreetsSignsFunction SignpostUtilities) | Move a graphic along a path in ArcMap (Code Files: cmdMoveGraphicAlongPath) | Multivariate renderer (Code Files: MultivariateRenderer) | Network Analyst barrier location editor (Code Files: EditorForm NABarrierLocationEditor) | Play back tracking data (Code Files: PlaybackDataButton) | Points along line construction tool (Code Files: PointsAlongLineForm) | RSS weather GraphicTracker (Code Files: RSSWeather) | RSS weather layer (Code Files: AddWeatherItemTool RSSWeatherLayerClass) | Server spatial query COM utility (Code Files: VegUtils_VBNet) | Server spatial query server object extension (Code Files: Extension) | StreetMap routing (Code Files: RoutingForm) | Tabbed feature inspector (Code Files: ObjectInspector TabbedInspector) | Time Series Graph tool add-in (Code Files: TimeSeriesGraph) | Using HookActions in custom commands (Code Files: hookActionsCallout hookActionsFlash hookActionsGraphic hookActionsLabel hookActionsPan hookActionsZoom) | Using the traversal result to select source features (Code Files: SelectFeaturesTool) | ViperPin tool (Code Files: ViperPinForm) |

.NET Related Topics

Updating features | 3DAnalyst | Building editor extensions using add-ins | Creating features | Creating features in the editor | DataSourcesRaster | DefenseSolutions | Executing spatial queries | Geodatabase | Geodatabase API best practices | How to access source features referenced by a network dataset | How to add point IDs to a polyline | How to animate the camera along a path (line feature) in globe | How to convert coordinate arrays | How to create a union of several polygons | How to define a renderer for your layer | How to develop the SOE | How to generate directions | How to load a raster dataset to the raster field in a feature class | How to load data into a network analysis problem | How to merge conflicting geometries during a reconcile | How to zoom to selected features in globe | Invalidating the display | Limiting query results and output | Querying geodatabase tables | Releasing COM references | Server object extensions (SOE) | Updating attributes of existing features | Using feature templates | Utility COM objects | Validating features | Working with query cursors |