1257 const int set_count = 2;
1259 int pgrastpos[2] = {-1, -1};
1267 char *reason = NULL;
1268 text *result = NULL;
1270 for (i = 0, j = 0; i < set_count; i++) {
1272 if (PG_ARGISNULL(j)) {
1273 for (k = 0; k < i; k++) {
1275 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1286 for (k = 0; k <= i; k++) {
1289 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1291 elog(ERROR,
"RASTER_notSameAlignmentReason: Could not deserialize the %s raster", i < 1 ?
"first" :
"second");
1302 for (k = 0; k < set_count; k++) {
1304 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1308 elog(ERROR,
"RASTER_notSameAlignmentReason: Could not test for alignment on the two rasters");
1312 result = cstring2text(reason);
1313 PG_RETURN_TEXT_P(result);
rt_errorstate rt_raster_same_alignment(rt_raster rast1, rt_raster rast2, int *aligned, char **reason)
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.