PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ RASTER_tile()

Datum RASTER_tile ( PG_FUNCTION_ARGS  )

Definition at line 948 of file rtpg_create.c.

949 {
950  FuncCallContext *funcctx;
951  int call_cntr;
952  int max_calls;
953  int i = 0;
954  int j = 0;
955 
956  struct tile_arg_t {
957 
958  struct {
960  double gt[6];
961  int srid;
962  int width;
963  int height;
964  } raster;
965 
966  struct {
967  int width;
968  int height;
969 
970  int nx;
971  int ny;
972  } tile;
973 
974  int numbands;
975  int *nbands;
976 
977  struct {
978  int pad;
979  double hasnodata;
980  double nodataval;
981  } pad;
982  };
983  struct tile_arg_t *arg1 = NULL;
984  struct tile_arg_t *arg2 = NULL;
985 
986  if (SRF_IS_FIRSTCALL()) {
987  MemoryContext oldcontext;
988  rt_pgraster *pgraster = NULL;
989  int numbands;
990 
991  ArrayType *array;
992  Oid etype;
993  Datum *e;
994  bool *nulls;
995 
996  int16 typlen;
997  bool typbyval;
998  char typalign;
999 
1000  POSTGIS_RT_DEBUG(2, "RASTER_tile: first call");
1001 
1002  /* create a function context for cross-call persistence */
1003  funcctx = SRF_FIRSTCALL_INIT();
1004 
1005  /* switch to memory context appropriate for multiple function calls */
1006  oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
1007 
1008  /* Get input arguments */
1009  if (PG_ARGISNULL(0)) {
1010  MemoryContextSwitchTo(oldcontext);
1011  SRF_RETURN_DONE(funcctx);
1012  }
1013 
1014  /* allocate arg1 */
1015  arg1 = palloc(sizeof(struct tile_arg_t));
1016  if (arg1 == NULL) {
1017  MemoryContextSwitchTo(oldcontext);
1018  elog(ERROR, "RASTER_tile: Could not allocate memory for arguments");
1019  SRF_RETURN_DONE(funcctx);
1020  }
1021 
1022  pgraster = (rt_pgraster *) PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0));
1023  arg1->raster.raster = rt_raster_deserialize(pgraster, FALSE);
1024  if (!arg1->raster.raster) {
1025  ereport(ERROR, (
1026  errcode(ERRCODE_OUT_OF_MEMORY),
1027  errmsg("Could not deserialize raster")
1028  ));
1029  pfree(arg1);
1030  PG_FREE_IF_COPY(pgraster, 0);
1031  MemoryContextSwitchTo(oldcontext);
1032  SRF_RETURN_DONE(funcctx);
1033  }
1034 
1035  /* raster has bands */
1036  numbands = rt_raster_get_num_bands(arg1->raster.raster);
1037  /*
1038  if (!numbands) {
1039  elog(NOTICE, "Raster provided has no bands");
1040  rt_raster_destroy(arg1->raster.raster);
1041  pfree(arg1);
1042  PG_FREE_IF_COPY(pgraster, 0);
1043  MemoryContextSwitchTo(oldcontext);
1044  SRF_RETURN_DONE(funcctx);
1045  }
1046  */
1047 
1048  /* width (1) */
1049  if (PG_ARGISNULL(1)) {
1050  elog(NOTICE, "Width cannot be NULL. Returning NULL");
1051  rt_raster_destroy(arg1->raster.raster);
1052  pfree(arg1);
1053  PG_FREE_IF_COPY(pgraster, 0);
1054  MemoryContextSwitchTo(oldcontext);
1055  SRF_RETURN_DONE(funcctx);
1056  }
1057  arg1->tile.width = PG_GETARG_INT32(1);
1058  if (arg1->tile.width < 1) {
1059  elog(NOTICE, "Width must be greater than zero. Returning NULL");
1060  rt_raster_destroy(arg1->raster.raster);
1061  pfree(arg1);
1062  PG_FREE_IF_COPY(pgraster, 0);
1063  MemoryContextSwitchTo(oldcontext);
1064  SRF_RETURN_DONE(funcctx);
1065  }
1066 
1067  /* height (2) */
1068  if (PG_ARGISNULL(2)) {
1069  elog(NOTICE, "Height cannot be NULL. Returning NULL");
1070  rt_raster_destroy(arg1->raster.raster);
1071  pfree(arg1);
1072  PG_FREE_IF_COPY(pgraster, 0);
1073  MemoryContextSwitchTo(oldcontext);
1074  SRF_RETURN_DONE(funcctx);
1075  }
1076  arg1->tile.height = PG_GETARG_INT32(2);
1077  if (arg1->tile.height < 1) {
1078  elog(NOTICE, "Height must be greater than zero. Returning NULL");
1079  rt_raster_destroy(arg1->raster.raster);
1080  pfree(arg1);
1081  PG_FREE_IF_COPY(pgraster, 0);
1082  MemoryContextSwitchTo(oldcontext);
1083  SRF_RETURN_DONE(funcctx);
1084  }
1085 
1086  /* nband, array (3) */
1087  if (numbands && !PG_ARGISNULL(3)) {
1088  array = PG_GETARG_ARRAYTYPE_P(3);
1089  etype = ARR_ELEMTYPE(array);
1090  get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign);
1091 
1092  switch (etype) {
1093  case INT2OID:
1094  case INT4OID:
1095  break;
1096  default:
1097  rt_raster_destroy(arg1->raster.raster);
1098  pfree(arg1);
1099  PG_FREE_IF_COPY(pgraster, 0);
1100  MemoryContextSwitchTo(oldcontext);
1101  elog(ERROR, "RASTER_tile: Invalid data type for band indexes");
1102  SRF_RETURN_DONE(funcctx);
1103  break;
1104  }
1105 
1106  deconstruct_array(array, etype, typlen, typbyval, typalign, &e, &nulls, &(arg1->numbands));
1107 
1108  arg1->nbands = palloc(sizeof(int) * arg1->numbands);
1109  if (arg1->nbands == NULL) {
1110  rt_raster_destroy(arg1->raster.raster);
1111  pfree(arg1);
1112  PG_FREE_IF_COPY(pgraster, 0);
1113  MemoryContextSwitchTo(oldcontext);
1114  elog(ERROR, "RASTER_tile: Could not allocate memory for band indexes");
1115  SRF_RETURN_DONE(funcctx);
1116  }
1117 
1118  for (i = 0, j = 0; i < arg1->numbands; i++) {
1119  if (nulls[i]) continue;
1120 
1121  switch (etype) {
1122  case INT2OID:
1123  arg1->nbands[j] = DatumGetInt16(e[i]) - 1;
1124  break;
1125  case INT4OID:
1126  arg1->nbands[j] = DatumGetInt32(e[i]) - 1;
1127  break;
1128  }
1129 
1130  j++;
1131  }
1132 
1133  if (j < arg1->numbands) {
1134  arg1->nbands = repalloc(arg1->nbands, sizeof(int) * j);
1135  if (arg1->nbands == NULL) {
1136  rt_raster_destroy(arg1->raster.raster);
1137  pfree(arg1);
1138  PG_FREE_IF_COPY(pgraster, 0);
1139  MemoryContextSwitchTo(oldcontext);
1140  elog(ERROR, "RASTER_tile: Could not reallocate memory for band indexes");
1141  SRF_RETURN_DONE(funcctx);
1142  }
1143 
1144  arg1->numbands = j;
1145  }
1146 
1147  /* validate nbands */
1148  for (i = 0; i < arg1->numbands; i++) {
1149  if (!rt_raster_has_band(arg1->raster.raster, arg1->nbands[i])) {
1150  elog(NOTICE, "Band at index %d not found in raster", arg1->nbands[i] + 1);
1151  rt_raster_destroy(arg1->raster.raster);
1152  pfree(arg1->nbands);
1153  pfree(arg1);
1154  PG_FREE_IF_COPY(pgraster, 0);
1155  MemoryContextSwitchTo(oldcontext);
1156  SRF_RETURN_DONE(funcctx);
1157  }
1158  }
1159  }
1160  else {
1161  arg1->numbands = numbands;
1162 
1163  if (numbands) {
1164  arg1->nbands = palloc(sizeof(int) * arg1->numbands);
1165 
1166  if (arg1->nbands == NULL) {
1167  rt_raster_destroy(arg1->raster.raster);
1168  pfree(arg1);
1169  PG_FREE_IF_COPY(pgraster, 0);
1170  MemoryContextSwitchTo(oldcontext);
1171  elog(ERROR, "RASTER_dumpValues: Could not allocate memory for pixel values");
1172  SRF_RETURN_DONE(funcctx);
1173  }
1174 
1175  for (i = 0; i < arg1->numbands; i++) {
1176  arg1->nbands[i] = i;
1177  POSTGIS_RT_DEBUGF(4, "arg1->nbands[%d] = %d", arg1->nbands[i], i);
1178  }
1179  }
1180  }
1181 
1182  /* pad (4) and padnodata (5) */
1183  if (!PG_ARGISNULL(4)) {
1184  arg1->pad.pad = PG_GETARG_BOOL(4) ? 1 : 0;
1185 
1186  if (arg1->pad.pad && !PG_ARGISNULL(5)) {
1187  arg1->pad.hasnodata = 1;
1188  arg1->pad.nodataval = PG_GETARG_FLOAT8(5);
1189  }
1190  else {
1191  arg1->pad.hasnodata = 0;
1192  arg1->pad.nodataval = 0;
1193  }
1194  }
1195  else {
1196  arg1->pad.pad = 0;
1197  arg1->pad.hasnodata = 0;
1198  arg1->pad.nodataval = 0;
1199  }
1200 
1201  /* store some additional metadata */
1202  arg1->raster.srid = rt_raster_get_srid(arg1->raster.raster);
1203  arg1->raster.width = rt_raster_get_width(arg1->raster.raster);
1204  arg1->raster.height = rt_raster_get_height(arg1->raster.raster);
1205  rt_raster_get_geotransform_matrix(arg1->raster.raster, arg1->raster.gt);
1206 
1207  /* determine maximum number of tiles from raster */
1208  arg1->tile.nx = ceil(arg1->raster.width / (double) arg1->tile.width);
1209  arg1->tile.ny = ceil(arg1->raster.height / (double) arg1->tile.height);
1210  POSTGIS_RT_DEBUGF(4, "# of tiles (x, y) = (%d, %d)", arg1->tile.nx, arg1->tile.ny);
1211 
1212  /* Store needed information */
1213  funcctx->user_fctx = arg1;
1214 
1215  /* total number of tuples to be returned */
1216  funcctx->max_calls = (arg1->tile.nx * arg1->tile.ny);
1217 
1218  MemoryContextSwitchTo(oldcontext);
1219  }
1220 
1221  /* stuff done on every call of the function */
1222  funcctx = SRF_PERCALL_SETUP();
1223 
1224  call_cntr = funcctx->call_cntr;
1225  max_calls = funcctx->max_calls;
1226  arg2 = funcctx->user_fctx;
1227 
1228  /* do when there is more left to send */
1229  if (call_cntr < max_calls) {
1230  rt_pgraster *pgtile = NULL;
1231  rt_raster tile = NULL;
1232  rt_band _band = NULL;
1233  rt_band band = NULL;
1234  rt_pixtype pixtype = PT_END;
1235  int hasnodata = 0;
1236  double nodataval = 0;
1237  int width = 0;
1238  int height = 0;
1239 
1240  int k = 0;
1241  int tx = 0;
1242  int ty = 0;
1243  int rx = 0;
1244  int ry = 0;
1245  int ex = 0; /* edge tile on right */
1246  int ey = 0; /* edge tile on bottom */
1247  double ulx = 0;
1248  double uly = 0;
1249  uint16_t len = 0;
1250  void *vals = NULL;
1251  uint16_t nvals;
1252 
1253  POSTGIS_RT_DEBUGF(3, "call number %d", call_cntr);
1254 
1255  /*
1256  find offset based upon tile #
1257 
1258  0 1 2
1259  3 4 5
1260  6 7 8
1261  */
1262  ty = call_cntr / arg2->tile.nx;
1263  tx = call_cntr % arg2->tile.nx;
1264  POSTGIS_RT_DEBUGF(4, "tile (x, y) = (%d, %d)", tx, ty);
1265 
1266  /* edge tile? only important if padding is false */
1267  if (!arg2->pad.pad) {
1268  if (ty + 1 == arg2->tile.ny)
1269  ey = 1;
1270  if (tx + 1 == arg2->tile.nx)
1271  ex = 1;
1272  }
1273 
1274  /* upper-left of tile in raster coordinates */
1275  rx = tx * arg2->tile.width;
1276  ry = ty * arg2->tile.height;
1277  POSTGIS_RT_DEBUGF(4, "raster coordinates = %d, %d", rx, ry);
1278 
1279  /* determine tile width and height */
1280  /* default to user-defined */
1281  width = arg2->tile.width;
1282  height = arg2->tile.height;
1283 
1284  /* override user-defined if edge tile (only possible if padding is false */
1285  if (ex || ey) {
1286  /* right edge */
1287  if (ex)
1288  width = arg2->raster.width - rx;
1289  /* bottom edge */
1290  if (ey)
1291  height = arg2->raster.height - ry;
1292  }
1293 
1294  /* create empty raster */
1295  tile = rt_raster_new(width, height);
1296  rt_raster_set_geotransform_matrix(tile, arg2->raster.gt);
1297  rt_raster_set_srid(tile, arg2->raster.srid);
1298 
1299  /* upper-left of tile in spatial coordinates */
1300  if (rt_raster_cell_to_geopoint(arg2->raster.raster, rx, ry, &ulx, &uly, arg2->raster.gt) != ES_NONE) {
1301  rt_raster_destroy(tile);
1302  rt_raster_destroy(arg2->raster.raster);
1303  if (arg2->numbands) pfree(arg2->nbands);
1304  pfree(arg2);
1305  elog(ERROR, "RASTER_tile: Could not compute the coordinates of the upper-left corner of the output tile");
1306  SRF_RETURN_DONE(funcctx);
1307  }
1308  rt_raster_set_offsets(tile, ulx, uly);
1309  POSTGIS_RT_DEBUGF(4, "spatial coordinates = %f, %f", ulx, uly);
1310 
1311  /* compute length of pixel line to read */
1312  len = arg2->tile.width;
1313  if (rx + arg2->tile.width >= arg2->raster.width)
1314  len = arg2->raster.width - rx;
1315  POSTGIS_RT_DEBUGF(3, "read line len = %d", len);
1316 
1317  /* copy bands to tile */
1318  for (i = 0; i < arg2->numbands; i++) {
1319  POSTGIS_RT_DEBUGF(4, "copying band %d to tile %d", arg2->nbands[i], call_cntr);
1320 
1321  _band = rt_raster_get_band(arg2->raster.raster, arg2->nbands[i]);
1322  if (_band == NULL) {
1323  int nband = arg2->nbands[i] + 1;
1324  rt_raster_destroy(tile);
1325  rt_raster_destroy(arg2->raster.raster);
1326  pfree(arg2->nbands);
1327  pfree(arg2);
1328  elog(ERROR, "RASTER_tile: Could not get band %d from source raster", nband);
1329  SRF_RETURN_DONE(funcctx);
1330  }
1331 
1332  pixtype = rt_band_get_pixtype(_band);
1333  hasnodata = rt_band_get_hasnodata_flag(_band);
1334  if (hasnodata)
1335  rt_band_get_nodata(_band, &nodataval);
1336  else if (arg2->pad.pad && arg2->pad.hasnodata) {
1337  hasnodata = 1;
1338  nodataval = arg2->pad.nodataval;
1339  }
1340  else
1341  nodataval = rt_band_get_min_value(_band);
1342 
1343  /* inline band */
1344  if (!rt_band_is_offline(_band)) {
1345  if (rt_raster_generate_new_band(tile, pixtype, nodataval, hasnodata, nodataval, i) < 0) {
1346  rt_raster_destroy(tile);
1347  rt_raster_destroy(arg2->raster.raster);
1348  pfree(arg2->nbands);
1349  pfree(arg2);
1350  elog(ERROR, "RASTER_tile: Could not add new band to output tile");
1351  SRF_RETURN_DONE(funcctx);
1352  }
1353  band = rt_raster_get_band(tile, i);
1354  if (band == NULL) {
1355  rt_raster_destroy(tile);
1356  rt_raster_destroy(arg2->raster.raster);
1357  pfree(arg2->nbands);
1358  pfree(arg2);
1359  elog(ERROR, "RASTER_tile: Could not get newly added band from output tile");
1360  SRF_RETURN_DONE(funcctx);
1361  }
1362 
1363  /* if isnodata, set flag and continue */
1364  if (rt_band_get_isnodata_flag(_band)) {
1366  continue;
1367  }
1368 
1369  /* copy data */
1370  for (j = 0; j < arg2->tile.height; j++) {
1371  k = ry + j;
1372 
1373  if (k >= arg2->raster.height) {
1374  POSTGIS_RT_DEBUGF(4, "row %d is beyond extent of source raster. skipping", k);
1375  continue;
1376  }
1377 
1378  POSTGIS_RT_DEBUGF(4, "getting pixel line %d, %d for %d pixels", rx, k, len);
1379  if (rt_band_get_pixel_line(_band, rx, k, len, &vals, &nvals) != ES_NONE) {
1380  rt_raster_destroy(tile);
1381  rt_raster_destroy(arg2->raster.raster);
1382  pfree(arg2->nbands);
1383  pfree(arg2);
1384  elog(ERROR, "RASTER_tile: Could not get pixel line from source raster");
1385  SRF_RETURN_DONE(funcctx);
1386  }
1387 
1388  if (nvals && rt_band_set_pixel_line(band, 0, j, vals, nvals) != ES_NONE) {
1389  rt_raster_destroy(tile);
1390  rt_raster_destroy(arg2->raster.raster);
1391  pfree(arg2->nbands);
1392  pfree(arg2);
1393  elog(ERROR, "RASTER_tile: Could not set pixel line of output tile");
1394  SRF_RETURN_DONE(funcctx);
1395  }
1396  }
1397  }
1398  /* offline */
1399  else {
1400  uint8_t bandnum = 0;
1401  rt_band_get_ext_band_num(_band, &bandnum);
1402 
1404  width, height,
1405  pixtype,
1406  hasnodata, nodataval,
1407  bandnum, rt_band_get_ext_path(_band)
1408  );
1409 
1410  if (band == NULL) {
1411  rt_raster_destroy(tile);
1412  rt_raster_destroy(arg2->raster.raster);
1413  pfree(arg2->nbands);
1414  pfree(arg2);
1415  elog(ERROR, "RASTER_tile: Could not create new offline band for output tile");
1416  SRF_RETURN_DONE(funcctx);
1417  }
1418 
1419  if (rt_raster_add_band(tile, band, i) < 0) {
1421  rt_raster_destroy(tile);
1422  rt_raster_destroy(arg2->raster.raster);
1423  pfree(arg2->nbands);
1424  pfree(arg2);
1425  elog(ERROR, "RASTER_tile: Could not add new offline band to output tile");
1426  SRF_RETURN_DONE(funcctx);
1427  }
1428  }
1429  }
1430 
1431  pgtile = rt_raster_serialize(tile);
1432  rt_raster_destroy(tile);
1433  if (!pgtile) {
1434  rt_raster_destroy(arg2->raster.raster);
1435  if (arg2->numbands) pfree(arg2->nbands);
1436  pfree(arg2);
1437  SRF_RETURN_DONE(funcctx);
1438  }
1439 
1440  SET_VARSIZE(pgtile, pgtile->size);
1441  SRF_RETURN_NEXT(funcctx, PointerGetDatum(pgtile));
1442  }
1443  /* do when there is no more left */
1444  else {
1445  rt_raster_destroy(arg2->raster.raster);
1446  if (arg2->numbands) pfree(arg2->nbands);
1447  pfree(arg2);
1448  SRF_RETURN_DONE(funcctx);
1449  }
1450 }
#define FALSE
Definition: dbfopen.c:168
rt_errorstate rt_band_set_isnodata_flag(rt_band band, int flag)
Set isnodata flag value.
Definition: rt_band.c:695
rt_errorstate rt_raster_cell_to_geopoint(rt_raster raster, double xr, double yr, double *xw, double *yw, double *gt)
Convert an xr, yr raster point to an xw, yw point on map.
Definition: rt_raster.c:755
int32_t rt_raster_get_srid(rt_raster raster)
Get raster's SRID.
Definition: rt_raster.c:356
int rt_raster_generate_new_band(rt_raster raster, rt_pixtype pixtype, double initialvalue, uint32_t hasnodata, double nodatavalue, int index)
Generate a new inline band and add it to a raster.
Definition: rt_raster.c:485
const char * rt_band_get_ext_path(rt_band band)
Return band's external path (only valid when rt_band_is_offline returns non-zero).
Definition: rt_band.c:363
void rt_raster_set_geotransform_matrix(rt_raster raster, double *gt)
Set raster's geotransform using 6-element array.
Definition: rt_raster.c:727
int rt_raster_add_band(rt_raster raster, rt_band band, int index)
Add band data to a raster.
Definition: rt_raster.c:405
int rt_band_get_hasnodata_flag(rt_band band)
Get hasnodata flag value.
Definition: rt_band.c:674
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:82
rt_pixtype
Definition: librtcore.h:185
@ PT_END
Definition: librtcore.h:197
int rt_band_get_isnodata_flag(rt_band band)
Get isnodata flag value.
Definition: rt_band.c:714
rt_raster rt_raster_new(uint32_t width, uint32_t height)
Construct a raster with given dimensions.
Definition: rt_raster.c:48
int rt_raster_has_band(rt_raster raster, int nband)
Return TRUE if the raster has a band of this number.
Definition: rt_raster.c:1347
void * rt_raster_serialize(rt_raster raster)
Return this raster in serialized form.
Definition: rt_serialize.c:521
double rt_band_get_min_value(rt_band band)
Returns the minimal possible value for the band according to the pixel type.
Definition: rt_band.c:1745
@ ES_NONE
Definition: librtcore.h:180
rt_errorstate rt_band_set_pixel_line(rt_band band, int x, int y, void *vals, uint32_t len)
Set values of multiple pixels.
Definition: rt_band.c:853
void rt_band_destroy(rt_band band)
Destroy a raster band.
Definition: rt_band.c:340
uint16_t rt_raster_get_num_bands(rt_raster raster)
Definition: rt_raster.c:372
uint16_t rt_raster_get_height(rt_raster raster)
Definition: rt_raster.c:129
rt_band rt_band_new_offline(uint16_t width, uint16_t height, rt_pixtype pixtype, uint32_t hasnodata, double nodataval, uint8_t bandNum, const char *path)
Create an out-db rt_band.
Definition: rt_band.c:124
rt_errorstate rt_band_get_ext_band_num(rt_band band, uint8_t *bandnum)
Return bands' external band number (only valid when rt_band_is_offline returns non-zero).
Definition: rt_band.c:376
void rt_raster_set_srid(rt_raster raster, int32_t srid)
Set raster's SRID.
Definition: rt_raster.c:363
rt_errorstate rt_band_get_nodata(rt_band band, double *nodata)
Get NODATA value.
Definition: rt_band.c:1730
rt_pixtype rt_band_get_pixtype(rt_band band)
Return pixeltype of this band.
Definition: rt_band.c:631
uint16_t rt_raster_get_width(rt_raster raster)
Definition: rt_raster.c:121
int rt_band_is_offline(rt_band band)
Return non-zero if the given band data is on the filesystem.
Definition: rt_band.c:329
void rt_raster_get_geotransform_matrix(rt_raster raster, double *gt)
Get 6-element array of raster geotransform matrix.
Definition: rt_raster.c:706
void rt_raster_set_offsets(rt_raster raster, double x, double y)
Set insertion points in projection units.
Definition: rt_raster.c:199
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.
Definition: rt_serialize.c:725
rt_errorstate rt_band_get_pixel_line(rt_band band, int x, int y, uint16_t len, void **vals, uint16_t *nvals)
Get values of multiple pixels.
Definition: rt_band.c:1137
rt_band rt_raster_get_band(rt_raster raster, int bandNum)
Return Nth band, or NULL if unavailable.
Definition: rt_raster.c:381
band
Definition: ovdump.py:57
nband
Definition: pixval.py:52
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
Definition: rtrowdump.py:121
gt
Definition: window.py:77
#define POSTGIS_RT_DEBUG(level, msg)
Definition: rtpostgis.h:61
#define POSTGIS_RT_DEBUGF(level, msg,...)
Definition: rtpostgis.h:65
Struct definitions.
Definition: librtcore.h:2250
unsigned char uint8_t
Definition: uthash.h:79

References ovdump::band, ES_NONE, FALSE, window::gt, pixval::nband, POSTGIS_RT_DEBUG, POSTGIS_RT_DEBUGF, PT_END, rtrowdump::raster, rt_band_destroy(), rt_band_get_ext_band_num(), rt_band_get_ext_path(), rt_band_get_hasnodata_flag(), rt_band_get_isnodata_flag(), rt_band_get_min_value(), rt_band_get_nodata(), rt_band_get_pixel_line(), rt_band_get_pixtype(), rt_band_is_offline(), rt_band_new_offline(), rt_band_set_isnodata_flag(), rt_band_set_pixel_line(), rt_raster_add_band(), rt_raster_cell_to_geopoint(), rt_raster_deserialize(), rt_raster_destroy(), rt_raster_generate_new_band(), rt_raster_get_band(), rt_raster_get_geotransform_matrix(), rt_raster_get_height(), rt_raster_get_num_bands(), rt_raster_get_srid(), rt_raster_get_width(), rt_raster_has_band(), rt_raster_new(), rt_raster_serialize(), rt_raster_set_geotransform_matrix(), rt_raster_set_offsets(), rt_raster_set_srid(), rt_raster_serialized_t::size, and rt_raster_t::srid.

Here is the call graph for this function: