317 int ndims_a, ndims_b;
319 POSTGIS_DEBUG(5,
"entered function");
321 if ( a == NULL && b == NULL )
323 elog(ERROR,
"gidx_union_edge received two null arguments");
341 ndims_a = GIDX_NDIMS(a);
342 ndims_b = GIDX_NDIMS(b);
345 result = Max(GIDX_GET_MAX(a,0),GIDX_GET_MAX(b,0)) - Min(GIDX_GET_MIN(a,0),GIDX_GET_MIN(b,0));
348 for ( i = 1; i < ndims_b; i++ )
350 result += (Max(GIDX_GET_MAX(a,i),GIDX_GET_MAX(b,i)) - Min(GIDX_GET_MIN(a,i),GIDX_GET_MIN(b,i)));
354 for ( i = ndims_b; i < ndims_a; i++ )
356 result += (GIDX_GET_MAX(a,i) - GIDX_GET_MIN(a,i));
359 POSTGIS_DEBUGF(5,
"edge( %s union %s ) = %.12g", gidx_to_string(a), gidx_to_string(b), result);
static bool gidx_is_unknown(const GIDX *a)
static float gidx_volume(GIDX *a)
static void gidx_dimensionality_check(GIDX **a, GIDX **b)