23#include "utils/fmgrprotos.h"
41#define SPTEST(f, x, y) \
42 DatumGetBool(DirectFunctionCall2(f, PointPGetDatum(x), PointPGetDatum(y)))
79 elog(
ERROR,
"getQuadrant: impossible case");
155 return (
pa->x >
pb->x) ? 1 : -1;
166 return (
pa->y >
pb->y) ? 1 : -1;
300 which = (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4);
311 which &= (1 << 3) | (1 << 4);
315 which &= (1 << 1) | (1 << 2);
323 which &= (1 << 2) | (1 << 3);
328 which &= (1 << 1) | (1 << 4);
364 elog(
ERROR,
"unrecognized strategy number: %d",
374 for (
i = 0;
i < 4; ++
i)
381 for (
i = 1;
i <= 4;
i++)
458 elog(
ERROR,
"unrecognized strategy number: %d",
#define Assert(condition)
#define palloc_object(type)
#define palloc_array(type, count)
#define palloc0_object(type)
static float8 get_float8_infinity(void)
#define DirectFunctionCall2(func, arg1, arg2)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_BOOL(x)
static Point * DatumGetPointP(Datum X)
static Datum PointPGetDatum(const Point *X)
static BOX * DatumGetBoxP(Datum X)
static Datum BoxPGetDatum(const BOX *X)
Datum point_eq(PG_FUNCTION_ARGS)
Datum point_above(PG_FUNCTION_ARGS)
Datum box_contain_pt(PG_FUNCTION_ARGS)
Datum point_below(PG_FUNCTION_ARGS)
Datum point_horiz(PG_FUNCTION_ARGS)
Datum point_left(PG_FUNCTION_ARGS)
Datum point_right(PG_FUNCTION_ARGS)
Datum point_vert(PG_FUNCTION_ARGS)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
#define qsort(a, b, c, d)
static bool DatumGetBool(Datum X)
static Datum PointerGetDatum(const void *X)
static int x_cmp(const void *a, const void *b)
static int y_cmp(const void *a, const void *b)
BOX * box_copy(BOX *orig)
double * spg_key_orderbys_distances(Datum key, bool isLeaf, ScanKey orderbys, int norderbys)
Datum spg_quad_picksplit(PG_FUNCTION_ARGS)
Datum spg_quad_choose(PG_FUNCTION_ARGS)
static int16 getQuadrant(Point *centroid, Point *tst)
Datum spg_quad_config(PG_FUNCTION_ARGS)
Datum spg_quad_leaf_consistent(PG_FUNCTION_ARGS)
Datum spg_quad_inner_consistent(PG_FUNCTION_ARGS)
static BOX * getQuadrantArea(BOX *bbox, Point *centroid, int quadrant)
#define RTLeftStrategyNumber
#define RTRightStrategyNumber
#define RTSameStrategyNumber
#define RTOldBelowStrategyNumber
#define RTBelowStrategyNumber
#define RTOldAboveStrategyNumber
#define RTAboveStrategyNumber
#define RTContainedByStrategyNumber
StrategyNumber sk_strategy
spgChooseResultType resultType
union spgChooseOut::@54 result
struct spgChooseOut::@54::@55 matchNode
MemoryContext traversalMemoryContext