PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ gidx_overlaps()

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

Definition at line 418 of file gserialized_gist_nd.c.

419 {
420  int i;
421  int ndims_b;
422  POSTGIS_DEBUG(5, "entered function");
423 
424  if ( (a == NULL) || (b == NULL) ) return false;
425 
426  if ( gidx_is_unknown(a) || gidx_is_unknown(b) )
427  return false;
428 
429  /* Ensure 'a' has the most dimensions. */
431 
432  ndims_b = GIDX_NDIMS(b);
433 
434  /* compare only up to dimensions of (b), missing dimensions always overlap */
435  for ( i = 0; i < ndims_b; i++ )
436  {
437  if ( GIDX_GET_MIN(a,i) > GIDX_GET_MAX(b,i) )
438  return false;
439  if ( GIDX_GET_MIN(b,i) > GIDX_GET_MAX(a,i) )
440  return false;
441  }
442 
443  return true;
444 }
bool gidx_is_unknown(const GIDX *a)
static void gidx_dimensionality_check(GIDX **a, GIDX **b)

References gidx_dimensionality_check(), and gidx_is_unknown().

Referenced by gserialized_gidx_geog_overlaps(), gserialized_gidx_geom_overlaps(), gserialized_gidx_gidx_overlaps(), gserialized_gist_consistent_internal(), gserialized_gist_consistent_leaf(), and gserialized_overlaps().

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