PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ gidx_volume()

static float gidx_volume ( GIDX *  a)
static

Definition at line 189 of file gserialized_gist_nd.c.

References gidx_is_unknown().

Referenced by gidx_union_volume(), and gserialized_gist_penalty().

190 {
191  float result;
192  int i;
193  if ( a == NULL || gidx_is_unknown(a) )
194  {
195  /* elog(ERROR, "gidx_volume received a null argument"); */
196  return 0.0;
197  }
198  result = GIDX_GET_MAX(a,0) - GIDX_GET_MIN(a,0);
199  for ( i = 1; i < GIDX_NDIMS(a); i++ )
200  result *= (GIDX_GET_MAX(a,i) - GIDX_GET_MIN(a,i));
201  POSTGIS_DEBUGF(5, "calculated volume of %s as %.8g", gidx_to_string(a), result);
202  return result;
203 }
static bool gidx_is_unknown(const GIDX *a)
Here is the call graph for this function:
Here is the caller graph for this function: