com.esri.arcgis.geodatabase
Class IFeatureProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.IRowBufferProxy
          extended by com.esri.arcgis.geodatabase.IRowProxy
              extended by com.esri.arcgis.geodatabase.IObjectProxy
                  extended by com.esri.arcgis.geodatabase.IFeatureProxy
All Implemented Interfaces:
IFeature, IObject, IRow, IRowBuffer, Externalizable, Serializable
Direct Known Subclasses:
ISchematicFeatureProxy, ITemporalFeatureProxy

public class IFeatureProxy
extends IObjectProxy
implements IFeature, Serializable

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

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

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

Product Availability

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

See Also:
IFeatureClass.getShapeFieldName(), IFeatureClass.getAreaField(), IFeatureClass.getLengthField(), IFeatureClass.createFeatureBuffer(), IFeatureClass.createFeature(), Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IFeatureProxy()
           
  IFeatureProxy(Object obj)
           
protected IFeatureProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 IEnvelope getExtent()
          The extent of the feature.
 int getFeatureType()
          The type of the feature.
 IGeometry getShape()
          A reference to the default shape for the feature.
 IGeometry getShapeCopy()
          A cloned copy of the default shape for the feature.
 void removeListener(String iidStr, Object theListener)
           
 void setShapeByRef(IGeometry shape)
          A reference to the default shape for the feature.
 
Methods inherited from class com.esri.arcgis.geodatabase.IObjectProxy
esri_getClass
 
Methods inherited from class com.esri.arcgis.geodatabase.IRowProxy
delete, getOID, getTable, isHasOID, store
 
Methods inherited from class com.esri.arcgis.geodatabase.IRowBufferProxy
getFields, getValue, setValue
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.geodatabase.IObject
esri_getClass
 
Methods inherited from interface com.esri.arcgis.geodatabase.IRow
delete, getOID, getTable, isHasOID, store
 
Methods inherited from interface com.esri.arcgis.geodatabase.IRowBuffer
getFields, getValue, setValue
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IFeatureProxy

public IFeatureProxy()

IFeatureProxy

public IFeatureProxy(Object obj)
              throws IOException
Throws:
IOException

IFeatureProxy

protected IFeatureProxy(Object obj,
                        String iid)
                 throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class IObjectProxy
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class IObjectProxy
Throws:
IOException

getShapeCopy

public IGeometry getShapeCopy()
                       throws IOException,
                              AutomationException
A cloned copy of the default shape for the feature.

Remarks

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getShapeCopy in interface IFeature
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getShape

public IGeometry getShape()
                   throws IOException,
                          AutomationException
A reference to the default shape for the feature.

Remarks

The basic process to change the shape of a feature is:

1) Get the feature's existing geometry through IFeature.ShapeCopy or create a new geometry
2) Modify the geometry
3) Set the feature's geometry using IFeature.Shape
4) Store the feature

All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getShape in interface IFeature
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setShapeByRef

public void setShapeByRef(IGeometry shape)
                   throws IOException,
                          AutomationException
A reference to the default shape for the feature.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setShapeByRef in interface IFeature
Parameters:
shape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtent

public IEnvelope getExtent()
                    throws IOException,
                           AutomationException
The extent of the feature.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getExtent in interface IFeature
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFeatureType

public int getFeatureType()
                   throws IOException,
                          AutomationException
The type of the feature.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFeatureType in interface IFeature
Returns:
A com.esri.arcgis.geodatabase.esriFeatureType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.