OFTInteger
This class represents an integer field within a data source, providing access to the underlying integer value. It ensures the field type is consistently identified as an integer, even when the underlying storage might use a different representation like a real number.
Constructor
Signature
def OFTInteger()
Methods
value()
@classmethod
def value() - > int
Return an integer contained in this field.
Returns
| Type | Description |
|---|---|
int | The integer value stored within the field, cast according to the bit depth of the field. |
type()
@classmethod
def type() - > int
GDAL uses OFTReals to represent OFTIntegers in created shapefiles -- forcing the type here since the underlying field type may actually be OFTReal.
Returns
| Type | Description |
|---|---|
int | The integer constant representing the OFTInteger field type, regardless of the underlying GDAL storage type. |