PostGIS  2.1.10dev-r@@SVN_REVISION@@
static bool gserialized_gist_consistent_internal_2d ( BOX2DF *  key,
BOX2DF *  query,
StrategyNumber  strategy 
)
inlinestatic

Definition at line 927 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(), and FALSE.

Referenced by gserialized_gist_consistent_2d().

928 {
929  bool retval;
930 
931  POSTGIS_DEBUGF(4, "[GIST] internal consistent, strategy [%d], count[%i], query[%s], key[%s]",
932  strategy, g2d_counter_internal++, box2df_to_string(query), box2df_to_string(key) );
933 
934  switch (strategy)
935  {
936 
937  /* Basic overlaps */
938  case RTOverlapStrategyNumber:
939  retval = (bool) box2df_overlaps(key, query);
940  break;
941  case RTSameStrategyNumber:
942  case RTContainsStrategyNumber:
943  case RTOldContainsStrategyNumber:
944  retval = (bool) box2df_contains(key, query);
945  break;
946  case RTContainedByStrategyNumber:
947  case RTOldContainedByStrategyNumber:
948  retval = (bool) box2df_overlaps(key, query);
949  break;
950 
951  /* To one side */
952  case RTAboveStrategyNumber:
953  retval = (bool)(!box2df_overbelow(key, query));
954  break;
955  case RTBelowStrategyNumber:
956  retval = (bool)(!box2df_overabove(key, query));
957  break;
958  case RTRightStrategyNumber:
959  retval = (bool)(!box2df_overleft(key, query));
960  break;
961  case RTLeftStrategyNumber:
962  retval = (bool)(!box2df_overright(key, query));
963  break;
964 
965  /* Overlapping to one side */
966  case RTOverAboveStrategyNumber:
967  retval = (bool)(!box2df_below(key, query));
968  break;
969  case RTOverBelowStrategyNumber:
970  retval = (bool)(!box2df_above(key, query));
971  break;
972  case RTOverRightStrategyNumber:
973  retval = (bool)(!box2df_left(key, query));
974  break;
975  case RTOverLeftStrategyNumber:
976  retval = (bool)(!box2df_right(key, query));
977  break;
978 
979  default:
980  retval = FALSE;
981  }
982 
983  return (retval);
984 }
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 bool box2df_overright(const BOX2DF *a, const BOX2DF *b)
static bool box2df_contains(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:169

Here is the call graph for this function:

Here is the caller graph for this function: