ArcObjects Library Reference (GeoDatabase)  

IGeometryDef Interface

Provides access to members that return information about the geometry definition.

Product Availability

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

Members

Description
Read-only property AvgNumPoints The estimated average number of points per feature.
Read-only property GeometryType The enumerated geometry type.
Read-only property GridCount The number of spatial index grids.
Read-only property GridSize The size of a spatial index grid.
Read-only property HasM Indicates if the feature class has measure (M) values.
Read-only property HasZ Indicates if the featureClass has Z values.
Read-only property SpatialReference The spatial reference for the dataset.

CoClasses that implement IGeometryDef

CoClasses and Classes Description
GeometryDef ESRI Geometry Definition object.

Remarks

The IGeometryDef interface provides read-only access to the GeometryDef properties.

The AvgNumPoints, GridCount and GridSize properties are all attributes of the geodatabase spatial index. Shapefiles will return 0 for GridCount.

[C#]

The following code shows how to get the GeometryDef of a feature class:

// Get the GeometryDef from the feature class's shape field.
String shapeFieldName = featureClass.ShapeFieldName;
int shapeFieldIndex = featureClass.FindField(shapeFieldName);
IFields fields = featureClass.Fields;
IField shapeField = fields.get_Field(shapeFieldIndex);
IGeometryDef geometryDef = shapeField.GeometryDef;

[Visual Basic .NET]

The following code shows how to get the GeometryDef of a feature class:

' Get the GeometryDef from the feature class's shape field.
Dim shapeFieldName As String = featureClass.ShapeFieldName
Dim shapeFieldIndex As Integer = featureClass.FindField(shapeFieldName)
Dim fields As IFields = featureClass.Fields
Dim shapeField As IField = fields.Field(shapeFieldIndex)
Dim geometryDef As IGeometryDef = shapeField.GeometryDef

See Also

IField Interface

.NET Samples

Convert part to feature command (Code Files: ConvertPart) | Route application using the NAServer extension in ArcGIS Server via a GIS client (Code Files: Route_GISClientClass) |

.NET Related Topics

Converting simple data | Creating annotation and dimension feature classes | Creating feature classes | Creating fields | Creating indexes | Working with fields | Working with indexes |