1193 int pgrastpos[2] = {-1, -1};
1201 char *reason = NULL;
1203 for (i = 0, j = 0; i < set_count; i++) {
1205 if (PG_ARGISNULL(j)) {
1206 for (k = 0; k < i; k++) {
1208 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1219 for (k = 0; k <= i; k++) {
1222 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1224 elog(ERROR,
"RASTER_sameAlignment: Could not deserialize the %s raster", i < 1 ?
"first" :
"second");
1235 for (k = 0; k < set_count; k++) {
1237 PG_FREE_IF_COPY(pgrast[k], pgrastpos[k]);
1241 elog(ERROR,
"RASTER_sameAlignment: Could not test for alignment on the two rasters");
1246 if (reason != NULL && !aligned)
1247 elog(NOTICE,
"%s", reason);
1249 PG_RETURN_BOOL(aligned);
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.