PostGIS  2.3.7dev-r@@SVN_REVISION@@
static float gidx_volume ( GIDX *  a)
static

Definition at line 219 of file gserialized_gist_nd.c.

References gidx_is_unknown().

Referenced by gidx_union_volume(), and gserialized_gist_penalty().

220 {
221  float result;
222  int i;
223  if ( a == NULL || gidx_is_unknown(a) )
224  {
225  /* elog(ERROR, "gidx_volume received a null argument"); */
226  return 0.0;
227  }
228  result = GIDX_GET_MAX(a,0) - GIDX_GET_MIN(a,0);
229  for ( i = 1; i < GIDX_NDIMS(a); i++ )
230  result *= (GIDX_GET_MAX(a,i) - GIDX_GET_MIN(a,i));
231  POSTGIS_DEBUGF(5, "calculated volume of %s as %.8g", gidx_to_string(a), result);
232  return result;
233 }
static bool gidx_is_unknown(const GIDX *a)

Here is the call graph for this function:

Here is the caller graph for this function: