|
@@ -1648,11 +1648,9 @@ blue.
|
|
|
.. method:: datatype(as_string=False)
|
|
|
|
|
|
The data type contained in the band, as an integer constant between 0
|
|
|
- (Unknown) and 11. If ``as_string`` is ``True``, the data type is
|
|
|
- returned as a string with the following possible values:
|
|
|
- ``GDT_Unknown``, ``GDT_Byte``, ``GDT_UInt16``, ``GDT_Int16``,
|
|
|
- ``GDT_UInt32``, ``GDT_Int32``, ``GDT_Float32``, ``GDT_Float64``,
|
|
|
- ``GDT_CInt16``, ``GDT_CInt32``, ``GDT_CFloat32``, and ``GDT_CFloat64``.
|
|
|
+ (Unknown) and 14. If ``as_string`` is ``True``, the data type is
|
|
|
+ returned as a string. Check out the "GDAL Pixel Type" column in the
|
|
|
+ :ref:`datatype value table <gdal-raster-datatype>` for possible values.
|
|
|
|
|
|
.. method:: color_interp(as_string=False)
|
|
|
|
|
@@ -1796,23 +1794,28 @@ Key Default Usage
|
|
|
name starts with ``/vsimem/``, the raster is created in GDAL's virtual
|
|
|
filesystem.
|
|
|
|
|
|
+.. _gdal-raster-datatype:
|
|
|
+
|
|
|
.. object:: datatype
|
|
|
|
|
|
Integer representing the data type for all the bands. Defaults to ``6``
|
|
|
(Float32). All bands of a new raster are required to have the same datatype.
|
|
|
The value mapping is:
|
|
|
|
|
|
- ===== =============== ===============================
|
|
|
+ ===== =============== ===================================
|
|
|
Value GDAL Pixel Type Description
|
|
|
- ===== =============== ===============================
|
|
|
- 1 GDT_Byte Eight bit unsigned integer
|
|
|
- 2 GDT_UInt16 Sixteen bit unsigned integer
|
|
|
- 3 GDT_Int16 Sixteen bit signed integer
|
|
|
- 4 GDT_UInt32 Thirty-two bit unsigned integer
|
|
|
- 5 GDT_Int32 Thirty-two bit signed integer
|
|
|
- 6 GDT_Float32 Thirty-two bit floating point
|
|
|
- 7 GDT_Float64 Sixty-four bit floating point
|
|
|
- ===== =============== ===============================
|
|
|
+ ===== =============== ===================================
|
|
|
+ 1 GDT_Byte 8 bit unsigned integer
|
|
|
+ 2 GDT_UInt16 16 bit unsigned integer
|
|
|
+ 3 GDT_Int16 16 bit signed integer
|
|
|
+ 4 GDT_UInt32 32 bit unsigned integer
|
|
|
+ 5 GDT_Int32 32 bit signed integer
|
|
|
+ 6 GDT_Float32 32 bit floating point
|
|
|
+ 7 GDT_Float64 64 bit floating point
|
|
|
+ 12 GDT_UInt64 64 bit unsigned integer (GDAL 3.5+)
|
|
|
+ 13 GDT_Int64 64 bit signed integer (GDAL 3.5+)
|
|
|
+ 14 GDT_Int8 8 bit signed integer (GDAL 3.7+)
|
|
|
+ ===== =============== ===================================
|
|
|
|
|
|
.. object:: nr_of_bands
|
|
|
|