PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ gidx_volume()

static float gidx_volume ( GIDX *  a)
static

Definition at line 218 of file gserialized_gist_nd.c.

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

References gidx_is_unknown().

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

Here is the call graph for this function:
Here is the caller graph for this function: