Return the type name of the GDAL data type.

gdal_datatypes()

datatype(x)

Arguments

x

integer as returned by GDAL, or osgeo.gdal.Open().GetDatatype()

Value

character string of the type name (the name of the constant in GDAL, e.g. GDT_Byte)

Examples

datatype(1)
#> [1] "GDT_Byte"
names(gdal_datatypes())
#>  [1] "GDT_Unknown"   "GDT_Byte"      "GDT_Int8"      "GDT_UInt16"   
#>  [5] "GDT_Int16"     "GDT_UInt32"    "GDT_Int32"     "GDT_UInt64"   
#>  [9] "GDT_Int64"     "GDT_Float32"   "GDT_Float64"   "GDT_CInt16"   
#> [13] "GDT_CInt32"    "GDT_CFloat32"  "GDT_CFloat64"  "GDT_TypeCount"