PostGIS  2.5.7dev-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 1129 of file gserialized_gist_2d.c.

1130 {
1131  bool retval;
1132 
1133  POSTGIS_DEBUGF(4, "[GIST] internal consistent, strategy [%d], count[%i], query[%s], key[%s]",
1134  strategy, g2d_counter_internal++, box2df_to_string(query), box2df_to_string(key) );
1135 
1136  switch (strategy)
1137  {
1138 
1139  /* Basic overlaps */
1140  case RTOverlapStrategyNumber:
1141  retval = (bool) box2df_overlaps(key, query);
1142  break;
1143  case RTSameStrategyNumber:
1144  case RTContainsStrategyNumber:
1145  case RTOldContainsStrategyNumber:
1146  retval = (bool) box2df_contains(key, query);
1147  break;
1148  case RTContainedByStrategyNumber:
1149  case RTOldContainedByStrategyNumber:
1150  retval = (bool) box2df_overlaps(key, query);
1151  break;
1152 
1153  /* To one side */
1154  case RTAboveStrategyNumber:
1155  retval = (bool)(!box2df_overbelow(key, query));
1156  break;
1157  case RTBelowStrategyNumber:
1158  retval = (bool)(!box2df_overabove(key, query));
1159  break;
1160  case RTRightStrategyNumber:
1161  retval = (bool)(!box2df_overleft(key, query));
1162  break;
1163  case RTLeftStrategyNumber:
1164  retval = (bool)(!box2df_overright(key, query));
1165  break;
1166 
1167  /* Overlapping to one side */
1168  case RTOverAboveStrategyNumber:
1169  retval = (bool)(!box2df_below(key, query));
1170  break;
1171  case RTOverBelowStrategyNumber:
1172  retval = (bool)(!box2df_above(key, query));
1173  break;
1174  case RTOverRightStrategyNumber:
1175  retval = (bool)(!box2df_left(key, query));
1176  break;
1177  case RTOverLeftStrategyNumber:
1178  retval = (bool)(!box2df_right(key, query));
1179  break;
1180 
1181  default:
1182  retval = false;
1183  }
1184 
1185  return (retval);
1186 }
bool box2df_left(const BOX2DF *a, const BOX2DF *b)
static char * box2df_to_string(const BOX2DF *a)
bool box2df_contains(const BOX2DF *a, const BOX2DF *b)
bool box2df_right(const BOX2DF *a, const BOX2DF *b)
bool box2df_overlaps(const BOX2DF *a, const BOX2DF *b)
bool box2df_above(const BOX2DF *a, const BOX2DF *b)
bool box2df_overbelow(const BOX2DF *a, const BOX2DF *b)
bool box2df_overright(const BOX2DF *a, const BOX2DF *b)
bool box2df_overabove(const BOX2DF *a, const BOX2DF *b)
bool box2df_below(const BOX2DF *a, const BOX2DF *b)
bool box2df_overleft(const BOX2DF *a, const BOX2DF *b)

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

Referenced by gserialized_gist_consistent_2d().

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