PostGIS  3.0.0dev-r@@SVN_REVISION@@

◆ gserialized_gist_consistent_leaf_2d()

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

Definition at line 1056 of file gserialized_gist_2d.c.

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

Referenced by gserialized_gist_consistent_2d().

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