IGeometryDef Interface

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

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.

IGeometryDef.AvgNumPoints Property

The estimated average number of points per feature.

Public ReadOnly Property AvgNumPoints As Integer
public int AvgNumPoints {get;}

IGeometryDef.GeometryType Property

The enumerated geometry type.

Public ReadOnly Property GeometryType As esriGeometryType
public esriGeometryType GeometryType {get;}

IGeometryDef.GridCount Property

The number of spatial index grids.

Public ReadOnly Property GridCount As Integer
public int GridCount {get;}

Remarks

Personal geodatabase feature classes only support one spatial index. Any additional indexes will be ignored. File and ArcSDE geodatabase feature classes support up to 3 spatial indexes.

IGeometryDef.GridSize Property

The size of a spatial index grid.

Public Function get_GridSize ( _
    ByVal Index As Integer _
) As Double
public double get_GridSize (
    int Index
);

Remarks

Personal geodatabase feature classes only support one spatial index. Any additional indexes will be ignored. File and ArcSDE geodatabase feature classes support up to 3 spatial indexes. The GridSize index is zero based with a maximum of index of 2.

If the value returned by this property is -2, it means the spatial index is an R-Tree index (e.g. Oracle Spatial, Informix, PostgreSQL).

IGeometryDef.HasM Property

Indicates if the feature class has measure (M) values.

Public ReadOnly Property HasM As Boolean
public bool HasM {get;}

IGeometryDef.HasZ Property

Indicates if the featureClass has Z values.

Public ReadOnly Property HasZ As Boolean
public bool HasZ {get;}

IGeometryDef.SpatialReference Property

The spatial reference for the dataset.

Public ReadOnly Property SpatialReference As ISpatialReference
public ISpatialReference SpatialReference {get;}

Classes that implement IGeometryDef

Classes Description
GeometryDef Esri Geometry Definition object.

Remarks

The IGeometryDefinterface provides read-only access to the GeometryDefproperties.

``The AvgNumPoints, GridCountand GridSizeproperties are all attributes of the geodatabase spatial index. Shapefiles will return 0 for GridCount.

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

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close