619 bool forcechecking =
FALSE;
620 bool skipset =
FALSE;
625 pgraster = (
rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
631 bandindex = PG_GETARG_INT32(1);
633 elog(NOTICE,
"Invalid band index (must use 1-based). Nodata value not set. Returning original raster");
639 PG_FREE_IF_COPY(pgraster, 0);
640 elog(ERROR,
"RASTER_setBandNoDataValue: Could not deserialize raster");
648 elog(NOTICE,
"Could not find raster band of index %d when setting pixel value. Nodata value not set. Returning original raster", bandindex);
651 if (!PG_ARGISNULL(3))
652 forcechecking = PG_GETARG_BOOL(3);
654 if (PG_ARGISNULL(2)) {
661 nodata = PG_GETARG_FLOAT8(2);
675 PG_FREE_IF_COPY(pgraster, 0);
679 SET_VARSIZE(pgrtn, pgrtn->
size);
680 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_errorstate rt_band_set_nodata(rt_band band, double val, int *converted)
Set nodata value.
#define POSTGIS_RT_DEBUGF(level, msg,...)
rt_band rt_raster_get_band(rt_raster raster, int bandNum)
Return Nth band, or NULL if unavailable.
int rt_band_check_is_nodata(rt_band band)
Returns TRUE if the band is only nodata values.
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
void rt_band_set_hasnodata_flag(rt_band band, int flag)
Set hasnodata flag value.
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.