DataType
Bases: Enum
Represents the type of data returned by a layer.
This enumeration defines the valid data types supported by Yirgacheffe, and is
what is returned by calling datatype on a layer or expression, and can be
passed to astype to convert values between types.
Attributes:
| Name | Type | Description |
|---|---|---|
Float32 |
32 bit floating point value |
|
Float64 |
64 bit floating point value |
|
Byte |
Unsigned 8 bit integer value |
|
Int8 |
Signed 8 bit integer value |
|
Int16 |
Signed 16 bit integer value |
|
Int32 |
Signed 32 bit integer value |
|
Int64 |
Signed 64 bit integer value |
|
UInt8 |
Unsigned 8 bit integer value |
|
UInt16 |
Unsigned 16 bit integer value |
|
UInt32 |
Unsigned 32 bit integer value |
|
UInt64 |
Unsigned 64 bit integer value |
of_array(val)
classmethod
Generates the Yirgacheffe data type value from a numpy array.
Returns:
| Type | Description |
|---|---|
dtype
|
A Yirgacheffe data type value. |
of_gdal(val)
classmethod
Generates the Yirgacheffe data type value from the correspondiong GDAL value.
Returns:
| Type | Description |
|---|---|
dtype
|
A Yirgacheffe data type value. |
sizeof()
Returns the number of bytes used to store the data type.
Returns:
| Type | Description |
|---|---|
int
|
The number of bytes used to store the data type. |
to_gdal()
Coverts the Yirgacheffe data type to the corresponding GDAL constant.
Returns:
| Type | Description |
|---|---|
int
|
An integer with the corresponding GDAL type constant. |