175 int i, dims_union, dims_new;
191 dims_union = GIDX_NDIMS(*b_union);
192 dims_new = GIDX_NDIMS(b_new);
194 POSTGIS_DEBUGF(4,
"merging gidx (%s) into gidx (%s)", gidx_to_string(b_new), gidx_to_string(*b_union));
196 if ( dims_new < dims_union )
198 POSTGIS_DEBUGF(5,
"reallocating b_union from %d dims to %d dims", dims_union, dims_new);
199 *b_union = (GIDX*)repalloc(*b_union, GIDX_SIZE(dims_new));
200 SET_VARSIZE(*b_union, VARSIZE(b_new));
201 dims_union = dims_new;
204 for ( i = 0; i < dims_union; i++ )
207 GIDX_SET_MIN(*b_union, i, Min(GIDX_GET_MIN(*b_union,i),GIDX_GET_MIN(b_new,i)));
209 GIDX_SET_MAX(*b_union, i, Max(GIDX_GET_MAX(*b_union,i),GIDX_GET_MAX(b_new,i)));
212 POSTGIS_DEBUGF(5,
"merge complete (%s)", gidx_to_string(*b_union));
static bool gidx_is_unknown(const GIDX *a)