PostGIS  2.4.9dev-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 1065 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().

1066 {
1067  bool retval;
1068 
1069  POSTGIS_DEBUGF(4, "[GIST] internal consistent, strategy [%d], count[%i], query[%s], key[%s]",
1070  strategy, g2d_counter_internal++, box2df_to_string(query), box2df_to_string(key) );
1071 
1072  switch (strategy)
1073  {
1074 
1075  /* Basic overlaps */
1076  case RTOverlapStrategyNumber:
1077  retval = (bool) box2df_overlaps(key, query);
1078  break;
1079  case RTSameStrategyNumber:
1080  case RTContainsStrategyNumber:
1081  case RTOldContainsStrategyNumber:
1082  retval = (bool) box2df_contains(key, query);
1083  break;
1084  case RTContainedByStrategyNumber:
1085  case RTOldContainedByStrategyNumber:
1086  retval = (bool) box2df_overlaps(key, query);
1087  break;
1088 
1089  /* To one side */
1090  case RTAboveStrategyNumber:
1091  retval = (bool)(!box2df_overbelow(key, query));
1092  break;
1093  case RTBelowStrategyNumber:
1094  retval = (bool)(!box2df_overabove(key, query));
1095  break;
1096  case RTRightStrategyNumber:
1097  retval = (bool)(!box2df_overleft(key, query));
1098  break;
1099  case RTLeftStrategyNumber:
1100  retval = (bool)(!box2df_overright(key, query));
1101  break;
1102 
1103  /* Overlapping to one side */
1104  case RTOverAboveStrategyNumber:
1105  retval = (bool)(!box2df_below(key, query));
1106  break;
1107  case RTOverBelowStrategyNumber:
1108  retval = (bool)(!box2df_above(key, query));
1109  break;
1110  case RTOverRightStrategyNumber:
1111  retval = (bool)(!box2df_left(key, query));
1112  break;
1113  case RTOverLeftStrategyNumber:
1114  retval = (bool)(!box2df_right(key, query));
1115  break;
1116 
1117  default:
1118  retval = FALSE;
1119  }
1120 
1121  return (retval);
1122 }
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_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
bool box2df_contains(const BOX2DF *a, const BOX2DF *b)
Here is the call graph for this function:
Here is the caller graph for this function: