523{
526 bool isempty =
FALSE;
527
528
529 if (PG_ARGISNULL(0)) PG_RETURN_NULL();
531
533 if ( ! raster )
534 {
535 ereport(ERROR,
536 (errcode(ERRCODE_OUT_OF_MEMORY),
537 errmsg("RASTER_isEmpty: Could not deserialize raster")));
538 PG_FREE_IF_COPY(pgraster, 0);
539 PG_RETURN_NULL();
540 }
541
543
545 PG_FREE_IF_COPY(pgraster, 0);
546
547 PG_RETURN_BOOL(isempty);
548}
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.
int rt_raster_is_empty(rt_raster raster)
Return TRUE if the raster is empty.
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...