370 POSTGIS_DEBUG(5,
"entered function");
372 if ( a == NULL || b == NULL )
374 elog(ERROR,
"gidx_inter_volume received a null argument");
387 result = Min(GIDX_GET_MAX(a,0),GIDX_GET_MAX(b,0)) - Max(GIDX_GET_MIN(a,0),GIDX_GET_MIN(b,0));
390 if ( result < 0.0 )
return 0.0;
393 for ( i = 1; i < GIDX_NDIMS(b); i++ )
395 float width = Min(GIDX_GET_MAX(a,i),GIDX_GET_MAX(b,i)) - Max(GIDX_GET_MIN(a,i),GIDX_GET_MIN(b,i));
396 if ( width < 0.0 )
return 0.0;
400 POSTGIS_DEBUGF(5,
"volume( %s intersection %s ) = %.12g", gidx_to_string(a), gidx_to_string(b), result);
static bool gidx_is_unknown(const GIDX *a)
static void gidx_dimensionality_check(GIDX **a, GIDX **b)