81#include "utils/fmgroids.h"
82#include "utils/fmgrprotos.h"
100 return (
x >
y) ? 1 : -1;
209 memcpy(next_rect_box, rect_box,
sizeof(
RectBox));
231 return next_rect_box;
393 return HYPOT(dx, dy);
458 lowXs[
i] = box->
low.
x;
460 lowYs[
i] = box->
low.
y;
473 centroid->
low.
x = lowXs[median];
474 centroid->
high.
x = highXs[median];
475 centroid->
low.
y = lowYs[median];
476 centroid->
high.
y = highYs[median];
634 for (quadrant = 0; quadrant < in->
nNodes; quadrant++)
691 elog(
ERROR,
"unrecognized strategy: %d", strategy);
727 pfree(next_rect_box);
831 elog(
ERROR,
"unrecognized strategy: %d", strategy);
static float8 get_float8_infinity(void)
#define DirectFunctionCall2(func, arg1, arg2)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_BOOL(x)
static bool FPlt(double A, double B)
static bool FPge(double A, double B)
#define PG_RETURN_BOX_P(x)
static Point * DatumGetPointP(Datum X)
static POLYGON * DatumGetPolygonP(Datum X)
static BOX * DatumGetBoxP(Datum X)
#define PG_GETARG_POLYGON_P(n)
static bool FPgt(double A, double B)
static bool FPle(double A, double B)
static Datum BoxPGetDatum(const BOX *X)
Datum box_left(PG_FUNCTION_ARGS)
Datum box_right(PG_FUNCTION_ARGS)
Datum box_same(PG_FUNCTION_ARGS)
Datum box_below(PG_FUNCTION_ARGS)
Datum box_overright(PG_FUNCTION_ARGS)
Datum box_overabove(PG_FUNCTION_ARGS)
Datum box_overlap(PG_FUNCTION_ARGS)
Datum box_contain(PG_FUNCTION_ARGS)
Datum box_overbelow(PG_FUNCTION_ARGS)
Datum box_contained(PG_FUNCTION_ARGS)
Datum box_overleft(PG_FUNCTION_ARGS)
Datum box_above(PG_FUNCTION_ARGS)
static bool right4D(RectBox *rect_box, RangeBox *query)
Datum spg_box_quad_choose(PG_FUNCTION_ARGS)
static double pointToRectBoxDistance(Point *point, RectBox *rect_box)
static bool contain4D(RectBox *rect_box, RangeBox *query)
static bool overLower2D(RangeBox *range_box, Range *query)
static bool overRight4D(RectBox *rect_box, RangeBox *query)
static uint8 getQuadrant(BOX *centroid, BOX *inBox)
Datum spg_box_quad_leaf_consistent(PG_FUNCTION_ARGS)
Datum spg_box_quad_inner_consistent(PG_FUNCTION_ARGS)
static RectBox * initRectBox(void)
static RangeBox * getRangeBox(BOX *box)
static bool overlap2D(RangeBox *range_box, Range *query)
Datum spg_box_quad_picksplit(PG_FUNCTION_ARGS)
static int compareDoubles(const void *a, const void *b)
Datum spg_bbox_quad_config(PG_FUNCTION_ARGS)
Datum spg_box_quad_config(PG_FUNCTION_ARGS)
static bool overLeft4D(RectBox *rect_box, RangeBox *query)
static bool lower2D(RangeBox *range_box, Range *query)
static bool above4D(RectBox *rect_box, RangeBox *query)
static BOX * spg_box_quad_get_scankey_bbox(ScanKey sk, bool *recheck)
static bool contained4D(RectBox *rect_box, RangeBox *query)
static bool overBelow4D(RectBox *rect_box, RangeBox *query)
static bool higher2D(RangeBox *range_box, Range *query)
static bool overlap4D(RectBox *rect_box, RangeBox *query)
static RectBox * nextRectBox(RectBox *rect_box, RangeBox *centroid, uint8 quadrant)
static bool left4D(RectBox *rect_box, RangeBox *query)
static bool contained2D(RangeBox *range_box, Range *query)
static bool overAbove4D(RectBox *rect_box, RangeBox *query)
static bool is_bounding_box_test_exact(StrategyNumber strategy)
static bool below4D(RectBox *rect_box, RangeBox *query)
Datum spg_poly_quad_compress(PG_FUNCTION_ARGS)
static bool overHigher2D(RangeBox *range_box, Range *query)
static bool contain2D(RangeBox *range_box, Range *query)
if(TABLE==NULL||TABLE_index==NULL)
void pfree(void *pointer)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
#define qsort(a, b, c, d)
static bool DatumGetBool(Datum X)
double * spg_key_orderbys_distances(Datum key, bool isLeaf, ScanKey orderbys, int norderbys)
#define RTOverlapStrategyNumber
#define RTLeftStrategyNumber
#define RTOverRightStrategyNumber
#define RTRightStrategyNumber
#define RTSameStrategyNumber
#define RTOverAboveStrategyNumber
#define RTContainsStrategyNumber
#define RTOverBelowStrategyNumber
#define RTBelowStrategyNumber
#define RTAboveStrategyNumber
#define RTOverLeftStrategyNumber
#define RTContainedByStrategyNumber
StrategyNumber sk_strategy
spgChooseResultType resultType
struct spgChooseOut::@51::@52 matchNode
union spgChooseOut::@51 result
MemoryContext traversalMemoryContext