PostGIS  2.1.10dev-r@@SVN_REVISION@@
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 229 of file rt_api.c.

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().

229  {
230  switch (pt) {
231  case PT_1BB:
232  case PT_2BUI:
233  case PT_4BUI:
234  case PT_8BUI:
235  return GDT_Byte;
236  case PT_8BSI:
237  case PT_16BSI:
238  return GDT_Int16;
239  case PT_16BUI:
240  return GDT_UInt16;
241  case PT_32BSI:
242  return GDT_Int32;
243  case PT_32BUI:
244  return GDT_UInt32;
245  case PT_32BF:
246  return GDT_Float32;
247  case PT_64BF:
248  return GDT_Float64;
249  default:
250  return GDT_Unknown;
251  }
252 
253  return GDT_Unknown;
254 }
Definition: rt_api.h:173

Here is the caller graph for this function: