624 PG_FREE_IF_COPY(pgraster, 0);
625 elog(ERROR,
"RASTER_metadata; Could not deserialize raster");
652 PG_FREE_IF_COPY(pgraster, 0);
655 if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) {
657 errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
659 "function returning record called in context "
660 "that cannot accept type record"
665 BlessTupleDesc(tupdesc);
667 values[0] = Float8GetDatum(
ipX);
668 values[1] = Float8GetDatum(
ipY);
669 values[2] = UInt32GetDatum(
width);
670 values[3] = UInt32GetDatum(
height);
671 values[4] = Float8GetDatum(
scaleX);
672 values[5] = Float8GetDatum(
scaleY);
673 values[6] = Float8GetDatum(
skewX);
674 values[7] = Float8GetDatum(
skewY);
675 values[8] = Int32GetDatum(
srid);
676 values[9] = UInt32GetDatum(
numBands);
681 tuple = heap_form_tuple(tupdesc, values, nulls);
684 result = HeapTupleGetDatum(tuple);
686 PG_RETURN_DATUM(result);
int32_t rt_raster_get_srid(rt_raster raster)
Get raster's SRID.
double rt_raster_get_x_skew(rt_raster raster)
Get skew about the X axis.
double rt_raster_get_x_offset(rt_raster raster)
Get raster x offset, in projection units.
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
double rt_raster_get_x_scale(rt_raster raster)
Get scale X in projection units.
uint16_t rt_raster_get_num_bands(rt_raster raster)
uint16_t rt_raster_get_height(rt_raster raster)
uint16_t rt_raster_get_width(rt_raster raster)
double rt_raster_get_y_scale(rt_raster raster)
Get scale Y in projection units.
double rt_raster_get_y_skew(rt_raster raster)
Get skew about the Y axis.
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.
double rt_raster_get_y_offset(rt_raster raster)
Get raster y offset, in projection units.
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)