694 pgraster = (
rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
698 PG_FREE_IF_COPY(pgraster, 0);
699 elog(ERROR,
"RASTER_setBandIsNoData: Could not deserialize raster");
707 bandindex = PG_GETARG_INT32(1);
710 elog(NOTICE,
"Invalid band index (must use 1-based). Isnodata flag not set. Returning original raster");
716 elog(NOTICE,
"Could not find raster band of index %d. Isnodata flag not set. Returning original raster", bandindex);
719 elog(NOTICE,
"Band of index %d has no NODATA so cannot be NODATA. Returning original raster", bandindex);
731 PG_FREE_IF_COPY(pgraster, 0);
732 if (!pgrtn) PG_RETURN_NULL();
734 SET_VARSIZE(pgrtn, pgrtn->
size);
735 PG_RETURN_POINTER(pgrtn);
void * rt_raster_serialize(rt_raster raster)
Return this raster in serialized form.
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
rt_band rt_raster_get_band(rt_raster raster, int bandNum)
Return Nth band, or NULL if unavailable.
int rt_band_get_hasnodata_flag(rt_band band)
Get hasnodata flag value.
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
rt_errorstate rt_band_set_isnodata_flag(rt_band band, int flag)
Set isnodata flag value.
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.