86 PG_FREE_IF_COPY(pgraster, 0);
87 elog(ERROR,
"RASTER_envelope: Could not deserialize raster");
94 PG_FREE_IF_COPY(pgraster, 0);
97 elog(ERROR,
"RASTER_envelope: Could not get raster's envelope");
100 else if (geom == NULL) {
101 elog(NOTICE,
"Raster's envelope is NULL");
108 SET_VARSIZE(gser, gser_size);
109 PG_RETURN_POINTER(gser);
GSERIALIZED * gserialized_from_lwgeom(LWGEOM *geom, size_t *size)
Allocate a new GSERIALIZED from an LWGEOM.
void lwgeom_free(LWGEOM *geom)
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
rt_errorstate rt_raster_get_envelope_geom(rt_raster raster, LWGEOM **env)
Get raster's envelope as a geometry.
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): ...