PostGIS  2.3.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 1030 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().

1031 {
1032  bool retval;
1033 
1034  POSTGIS_DEBUGF(4, "[GIST] internal consistent, strategy [%d], count[%i], query[%s], key[%s]",
1035  strategy, g2d_counter_internal++, box2df_to_string(query), box2df_to_string(key) );
1036 
1037  switch (strategy)
1038  {
1039 
1040  /* Basic overlaps */
1041  case RTOverlapStrategyNumber:
1042  retval = (bool) box2df_overlaps(key, query);
1043  break;
1044  case RTSameStrategyNumber:
1045  case RTContainsStrategyNumber:
1046  case RTOldContainsStrategyNumber:
1047  retval = (bool) box2df_contains(key, query);
1048  break;
1049  case RTContainedByStrategyNumber:
1050  case RTOldContainedByStrategyNumber:
1051  retval = (bool) box2df_overlaps(key, query);
1052  break;
1053 
1054  /* To one side */
1055  case RTAboveStrategyNumber:
1056  retval = (bool)(!box2df_overbelow(key, query));
1057  break;
1058  case RTBelowStrategyNumber:
1059  retval = (bool)(!box2df_overabove(key, query));
1060  break;
1061  case RTRightStrategyNumber:
1062  retval = (bool)(!box2df_overleft(key, query));
1063  break;
1064  case RTLeftStrategyNumber:
1065  retval = (bool)(!box2df_overright(key, query));
1066  break;
1067 
1068  /* Overlapping to one side */
1069  case RTOverAboveStrategyNumber:
1070  retval = (bool)(!box2df_below(key, query));
1071  break;
1072  case RTOverBelowStrategyNumber:
1073  retval = (bool)(!box2df_above(key, query));
1074  break;
1075  case RTOverRightStrategyNumber:
1076  retval = (bool)(!box2df_left(key, query));
1077  break;
1078  case RTOverLeftStrategyNumber:
1079  retval = (bool)(!box2df_right(key, query));
1080  break;
1081 
1082  default:
1083  retval = FALSE;
1084  }
1085 
1086  return (retval);
1087 }
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: