PostGIS  2.5.0dev-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 1120 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(), gserialized_gist_consistent_2d(), and PG_FUNCTION_INFO_V1().

Referenced by gserialized_gist_consistent_2d().

1121 {
1122  bool retval;
1123 
1124  POSTGIS_DEBUGF(4, "[GIST] internal consistent, strategy [%d], count[%i], query[%s], key[%s]",
1125  strategy, g2d_counter_internal++, box2df_to_string(query), box2df_to_string(key) );
1126 
1127  switch (strategy)
1128  {
1129 
1130  /* Basic overlaps */
1131  case RTOverlapStrategyNumber:
1132  retval = (bool) box2df_overlaps(key, query);
1133  break;
1134  case RTSameStrategyNumber:
1135  case RTContainsStrategyNumber:
1136  case RTOldContainsStrategyNumber:
1137  retval = (bool) box2df_contains(key, query);
1138  break;
1139  case RTContainedByStrategyNumber:
1140  case RTOldContainedByStrategyNumber:
1141  retval = (bool) box2df_overlaps(key, query);
1142  break;
1143 
1144  /* To one side */
1145  case RTAboveStrategyNumber:
1146  retval = (bool)(!box2df_overbelow(key, query));
1147  break;
1148  case RTBelowStrategyNumber:
1149  retval = (bool)(!box2df_overabove(key, query));
1150  break;
1151  case RTRightStrategyNumber:
1152  retval = (bool)(!box2df_overleft(key, query));
1153  break;
1154  case RTLeftStrategyNumber:
1155  retval = (bool)(!box2df_overright(key, query));
1156  break;
1157 
1158  /* Overlapping to one side */
1159  case RTOverAboveStrategyNumber:
1160  retval = (bool)(!box2df_below(key, query));
1161  break;
1162  case RTOverBelowStrategyNumber:
1163  retval = (bool)(!box2df_above(key, query));
1164  break;
1165  case RTOverRightStrategyNumber:
1166  retval = (bool)(!box2df_left(key, query));
1167  break;
1168  case RTOverLeftStrategyNumber:
1169  retval = (bool)(!box2df_right(key, query));
1170  break;
1171 
1172  default:
1173  retval = false;
1174  }
1175 
1176  return (retval);
1177 }
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)
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: