201 if (arg == NULL || array == NULL) {
202 elog(ERROR,
"rtpg_nmapalgebra_rastbandarg_process: NULL values not permitted for parameters");
206 etype = ARR_ELEMTYPE(array);
207 get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign);
212 typlen, typbyval, typalign,
217 elog(ERROR,
"rtpg_nmapalgebra_rastbandarg_process: Invalid argument for rastbandarg");
235 arg->
nband == NULL ||
239 elog(ERROR,
"rtpg_nmapalgebra_rastbandarg_process: Could not allocate memory for processing rastbandarg");
248 for (i = 0; i < n; i++) {
263 tup = (HeapTupleHeader) DatumGetPointer(e[i]);
265 elog(ERROR,
"rtpg_nmapalgebra_rastbandarg_process: Invalid argument for rastbandarg at index %d", i);
271 tupv = GetAttributeByName(tup,
"rast", &isnull);
273 elog(NOTICE,
"First argument (nband) of rastbandarg at index %d is NULL. Assuming NULL raster", i);
287 for (j = 0; j < i; j++) {
299 if (arg->
raster[i] == NULL) {
300 elog(ERROR,
"rtpg_nmapalgebra_rastbandarg_process: Could not deserialize raster at index %d", i);
316 tupv = GetAttributeByName(tup,
"nband", &isnull);
319 elog(NOTICE,
"First argument (nband) of rastbandarg at index %d is NULL. Assuming nband = %d", i, nband);
322 nband = DatumGetInt32(tupv);
325 elog(ERROR,
"rtpg_nmapalgebra_rastbandarg_process: Band number provided for rastbandarg at index %d must be greater than zero (1-based)", i);
329 arg->
nband[i] = nband - 1;
349 arg->
nband == NULL ||
352 elog(ERROR,
"rtpg_nmapalgebra_rastbandarg_process: Could not reallocate memory for processed rastbandarg");
int rt_raster_is_empty(rt_raster raster)
Return TRUE if the raster is empty.
#define POSTGIS_RT_DEBUGF(level, msg,...)
int rt_raster_has_band(rt_raster raster, int nband)
Return TRUE if the raster has a band of this number.
#define POSTGIS_RT_DEBUG(level, msg)
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.