PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ rt_util_pixtype_to_gdal_datatype()

GDALDataType rt_util_pixtype_to_gdal_datatype ( rt_pixtype  pt)

Convert rt_pixtype to GDALDataType.

Parameters
pt: pixeltype to convert
Returns
valid GDALDataType

Definition at line 120 of file rt_util.c.

120  {
121  switch (pt) {
122  case PT_1BB:
123  case PT_2BUI:
124  case PT_4BUI:
125  case PT_8BUI:
126  return GDT_Byte;
127  case PT_8BSI:
128  case PT_16BSI:
129  return GDT_Int16;
130  case PT_16BUI:
131  return GDT_UInt16;
132  case PT_32BSI:
133  return GDT_Int32;
134  case PT_32BUI:
135  return GDT_UInt32;
136  case PT_32BF:
137  return GDT_Float32;
138  case PT_64BF:
139  return GDT_Float64;
140  default:
141  return GDT_Unknown;
142  }
143 
144  return GDT_Unknown;
145 }
@ PT_32BUI
Definition: librtcore.h:194
@ PT_2BUI
Definition: librtcore.h:187
@ PT_32BSI
Definition: librtcore.h:193
@ PT_4BUI
Definition: librtcore.h:188
@ PT_32BF
Definition: librtcore.h:195
@ PT_1BB
Definition: librtcore.h:186
@ PT_16BUI
Definition: librtcore.h:192
@ PT_8BSI
Definition: librtcore.h:189
@ PT_16BSI
Definition: librtcore.h:191
@ PT_64BF
Definition: librtcore.h:196
@ PT_8BUI
Definition: librtcore.h:190

References PT_16BSI, PT_16BUI, PT_1BB, PT_2BUI, PT_32BF, PT_32BSI, PT_32BUI, PT_4BUI, PT_64BF, PT_8BSI, and PT_8BUI.

Referenced by rt_band_load_offline_data(), rt_raster_gdal_rasterize(), rt_raster_gdal_warp(), and rt_raster_to_gdal_mem().

Here is the caller graph for this function: