109 if (PG_ARGISNULL(0)) PG_RETURN_NULL();
110 pgraster = (
rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
114 PG_FREE_IF_COPY(pgraster, 0);
115 elog(ERROR,
"RASTER_asHexWKB: Cannot deserialize raster");
119 if (!PG_ARGISNULL(1))
120 outasin = PG_GETARG_BOOL(1);
125 PG_FREE_IF_COPY(pgraster, 0);
126 elog(ERROR,
"RASTER_asHexWKB: Cannot allocate and generate Hex WKB data");
132 PG_FREE_IF_COPY(pgraster, 0);
134 result = cstring_to_text(hexwkb);
136 PG_RETURN_TEXT_P(result);
char * rt_raster_to_hexwkb(rt_raster raster, int outasin, uint32_t *hexwkbsize)
Return this raster in HEXWKB form (null-terminated hex)
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.
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
#define POSTGIS_RT_DEBUG(level, msg)