893 int32_t newSRID = PG_GETARG_INT32(1);
895 if (PG_ARGISNULL(0)) PG_RETURN_NULL();
896 pgraster = (
rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
900 PG_FREE_IF_COPY(pgraster, 0);
901 elog(ERROR,
"RASTER_setSRID: Could not deserialize raster");
909 PG_FREE_IF_COPY(pgraster, 0);
910 if (!pgrtn) PG_RETURN_NULL();
912 SET_VARSIZE(pgrtn, pgrtn->
size);
914 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): ...
void rt_raster_set_srid(rt_raster raster, int32_t srid)
Set raster's SRID.
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.