PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ gserialized_gist_consistent_internal_2d()

static bool gserialized_gist_consistent_internal_2d ( BOX2DF *  key,
BOX2DF *  query,
StrategyNumber  strategy 
)
inlinestatic

Definition at line 925 of file gserialized_gist_2d.c.

References box2df_above(), box2df_below(), box2df_contains(), box2df_left(), box2df_overabove(), box2df_overbelow(), box2df_overlaps(), box2df_overleft(), box2df_overright(), box2df_right(), box2df_to_string(), FALSE, gserialized_gist_consistent_2d(), and PG_FUNCTION_INFO_V1().

Referenced by gserialized_gist_consistent_2d().

926 {
927  bool retval;
928 
929  POSTGIS_DEBUGF(4, "[GIST] internal consistent, strategy [%d], count[%i], query[%s], key[%s]",
930  strategy, g2d_counter_internal++, box2df_to_string(query), box2df_to_string(key) );
931 
932  switch (strategy)
933  {
934 
935  /* Basic overlaps */
936  case RTOverlapStrategyNumber:
937  retval = (bool) box2df_overlaps(key, query);
938  break;
939  case RTSameStrategyNumber:
940  case RTContainsStrategyNumber:
941  case RTOldContainsStrategyNumber:
942  retval = (bool) box2df_contains(key, query);
943  break;
944  case RTContainedByStrategyNumber:
945  case RTOldContainedByStrategyNumber:
946  retval = (bool) box2df_overlaps(key, query);
947  break;
948 
949  /* To one side */
950  case RTAboveStrategyNumber:
951  retval = (bool)(!box2df_overbelow(key, query));
952  break;
953  case RTBelowStrategyNumber:
954  retval = (bool)(!box2df_overabove(key, query));
955  break;
956  case RTRightStrategyNumber:
957  retval = (bool)(!box2df_overleft(key, query));
958  break;
959  case RTLeftStrategyNumber:
960  retval = (bool)(!box2df_overright(key, query));
961  break;
962 
963  /* Overlapping to one side */
964  case RTOverAboveStrategyNumber:
965  retval = (bool)(!box2df_below(key, query));
966  break;
967  case RTOverBelowStrategyNumber:
968  retval = (bool)(!box2df_above(key, query));
969  break;
970  case RTOverRightStrategyNumber:
971  retval = (bool)(!box2df_left(key, query));
972  break;
973  case RTOverLeftStrategyNumber:
974  retval = (bool)(!box2df_right(key, query));
975  break;
976 
977  default:
978  retval = FALSE;
979  }
980 
981  return (retval);
982 }
static bool box2df_overlaps(const BOX2DF *a, const BOX2DF *b)
static bool box2df_left(const BOX2DF *a, const BOX2DF *b)
static bool box2df_below(const BOX2DF *a, const BOX2DF *b)
static bool box2df_right(const BOX2DF *a, const BOX2DF *b)
static bool box2df_above(const BOX2DF *a, const BOX2DF *b)
static char * box2df_to_string(const BOX2DF *a)
static bool box2df_overright(const BOX2DF *a, const BOX2DF *b)
static bool box2df_contains(const BOX2DF *a, const BOX2DF *b)
static bool box2df_overabove(const BOX2DF *a, const BOX2DF *b)
static bool box2df_overbelow(const BOX2DF *a, const BOX2DF *b)
static bool box2df_overleft(const BOX2DF *a, const BOX2DF *b)
#define FALSE
Definition: dbfopen.c:168
Here is the call graph for this function:
Here is the caller graph for this function: