1260 int pgrastpos[2] = {-1, -1};
1268 char *reason = NULL;
1269 text *result = NULL;
1271 for (i = 0, j = 0; i < set_count; i++) {
1273 if (PG_ARGISNULL(j)) {
1274 for (k = 0; k < i; k++) {
1276 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1287 for (k = 0; k <= i; k++) {
1290 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1292 elog(ERROR,
"RASTER_notSameAlignmentReason: Could not deserialize the %s raster", i < 1 ?
"first" :
"second");
1303 for (k = 0; k < set_count; k++) {
1305 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1309 elog(ERROR,
"RASTER_notSameAlignmentReason: Could not test for alignment on the two rasters");
1313 result = cstring_to_text(reason);
1314 PG_RETURN_TEXT_P(result);
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
rt_errorstate rt_raster_same_alignment(rt_raster rast1, rt_raster rast2, int *aligned, char **reason)
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.