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

Definition at line 184 of file gserialized_gist_nd.c.

References gidx_is_unknown(), and result.

Referenced by gidx_union_volume(), and gserialized_gist_penalty().

185 {
186  float result;
187  int i;
188  if ( a == NULL || gidx_is_unknown(a) )
189  {
190  /* elog(ERROR, "gidx_volume received a null argument"); */
191  return 0.0;
192  }
193  result = GIDX_GET_MAX(a,0) - GIDX_GET_MIN(a,0);
194  for ( i = 1; i < GIDX_NDIMS(a); i++ )
195  result *= (GIDX_GET_MAX(a,i) - GIDX_GET_MIN(a,i));
196  POSTGIS_DEBUGF(5, "calculated volume of %s as %.8g", gidx_to_string(a), result);
197  return result;
198 }
static bool gidx_is_unknown(const GIDX *a)
char ** result
Definition: liblwgeom.h:218

Here is the call graph for this function:

Here is the caller graph for this function: