This document is archived and information here might be outdated.  Recommended version.


IGeometryDef Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IG > IGeometryDef Interface
ArcGIS Developer Help

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

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

Classes that implement IGeometryDef

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 | ISpatialReference Interface