421 bandindex = PG_GETARG_INT32(1);
422 if ( bandindex < 1 ) {
423 elog(NOTICE,
"Invalid band index (must use 1-based). Returning NULL");
427 if (PG_ARGISNULL(0)) PG_RETURN_NULL();
428 pgraster = (
rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
432 PG_FREE_IF_COPY(pgraster, 0);
433 elog(ERROR,
"RASTER_getBandFileTimestamp: Could not deserialize raster");
442 "Could not find raster band of index %d when getting band path. Returning NULL",
446 PG_FREE_IF_COPY(pgraster, 0);
451 elog(NOTICE,
"Band of index %d is not out-db.", bandindex);
454 PG_FREE_IF_COPY(pgraster, 0);
462 PG_FREE_IF_COPY(pgraster, 0);
464 PG_RETURN_INT64(fileSize);
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
void rt_band_destroy(rt_band band)
Destroy a raster band.
uint64_t rt_band_get_file_timestamp(rt_band band)
Return file timestamp.
int rt_band_is_offline(rt_band band)
Return non-zero if the given band data is on the filesystem.
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.
rt_band rt_raster_get_band(rt_raster raster, int bandNum)
Return Nth band, or NULL if unavailable.
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...