PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ gidx_equals()

static bool gidx_equals ( GIDX *  a,
GIDX *  b 
)
static

Definition at line 497 of file gserialized_gist_nd.c.

498 {
499  uint32_t i;
500 
501  POSTGIS_DEBUG(5, "entered function");
502 
503  if ( (a == NULL) && (b == NULL) ) return true;
504  if ( (a == NULL) || (b == NULL) ) return false;
505 
506  if ( gidx_is_unknown(a) && gidx_is_unknown(b) )
507  return true;
508 
509  if ( gidx_is_unknown(a) || gidx_is_unknown(b) )
510  return false;
511 
512  /* Ensure 'a' has the most dimensions. */
514 
515  /* For all shared dimensions min(a) == min(b), max(a) == max(b) */
516  for (i = 0; i < GIDX_NDIMS(b); i++)
517  {
518  if ( GIDX_GET_MIN(a,i) != GIDX_GET_MIN(b,i) )
519  return false;
520  if ( GIDX_GET_MAX(a,i) != GIDX_GET_MAX(b,i) )
521  return false;
522  }
523  /* For all unshared dimensions min(a) == 0.0, max(a) == 0.0 */
524  for (i = GIDX_NDIMS(b); i < GIDX_NDIMS(a); i++)
525  {
526  if ( GIDX_GET_MIN(a,i) != 0.0 )
527  return false;
528  if ( GIDX_GET_MAX(a,i) != 0.0 )
529  return false;
530  }
531  return true;
532 }
bool gidx_is_unknown(const GIDX *a)
static void gidx_dimensionality_check(GIDX **a, GIDX **b)
unsigned int uint32_t
Definition: uthash.h:78

References gidx_dimensionality_check(), and gidx_is_unknown().

Referenced by gserialized_gidx_geom_same(), gserialized_gidx_gidx_same(), gserialized_gist_consistent_leaf(), gserialized_gist_picksplit(), and gserialized_gist_same().

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