1190 const int set_count = 2;
1192 int pgrastpos[2] = {-1, -1};
1200 char *reason = NULL;
1202 for (i = 0, j = 0; i < set_count; i++) {
1204 if (PG_ARGISNULL(j)) {
1205 for (k = 0; k < i; k++) {
1207 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1218 for (k = 0; k <= i; k++) {
1221 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1223 elog(ERROR,
"RASTER_sameAlignment: Could not deserialize the %s raster", i < 1 ?
"first" :
"second");
1234 for (k = 0; k < set_count; k++) {
1236 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1240 elog(ERROR,
"RASTER_sameAlignment: Could not test for alignment on the two rasters");
1245 if (reason != NULL && !aligned)
1246 elog(NOTICE,
"%s", reason);
1248 PG_RETURN_BOOL(aligned);
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.