PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ gidx_volume()

static float gidx_volume ( GIDX *  a)
static

Definition at line 217 of file gserialized_gist_nd.c.

References gidx_is_unknown().

Referenced by gidx_union_edge(), gidx_union_volume(), and gserialized_gist_penalty().

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