PostGIS  2.4.9dev-r@@SVN_REVISION@@
gserialized_gist_nd.c File Reference
#include "postgres.h"
#include "access/gist.h"
#include "access/itup.h"
#include "access/skey.h"
#include "../postgis_config.h"
#include "liblwgeom.h"
#include "lwgeom_pg.h"
#include "gserialized_gist.h"
#include "geography.h"
#include <assert.h>
Include dependency graph for gserialized_gist_nd.c:

Go to the source code of this file.

Macros

#define LIMIT_RATIO   0.1
 
#define BELOW(d)   (2*(d))
 
#define ABOVE(d)   ((2*(d))+1)
 

Typedefs

typedef bool(* gidx_predicate) (GIDX *a, GIDX *b)
 

Functions

Datum gidx_out (PG_FUNCTION_ARGS)
 
Datum gidx_in (PG_FUNCTION_ARGS)
 
Datum gserialized_gist_consistent (PG_FUNCTION_ARGS)
 
Datum gserialized_gist_compress (PG_FUNCTION_ARGS)
 
Datum gserialized_gist_decompress (PG_FUNCTION_ARGS)
 
Datum gserialized_gist_penalty (PG_FUNCTION_ARGS)
 
Datum gserialized_gist_picksplit (PG_FUNCTION_ARGS)
 
Datum gserialized_gist_union (PG_FUNCTION_ARGS)
 
Datum gserialized_gist_same (PG_FUNCTION_ARGS)
 
Datum gserialized_gist_distance (PG_FUNCTION_ARGS)
 
Datum gserialized_gist_geog_distance (PG_FUNCTION_ARGS)
 
Datum gserialized_overlaps (PG_FUNCTION_ARGS)
 
Datum gserialized_contains (PG_FUNCTION_ARGS)
 
Datum gserialized_gidx_geom_contains (PG_FUNCTION_ARGS)
 
Datum gserialized_gidx_gidx_contains (PG_FUNCTION_ARGS)
 
Datum gserialized_within (PG_FUNCTION_ARGS)
 
Datum gserialized_gidx_geom_within (PG_FUNCTION_ARGS)
 
Datum gserialized_gidx_gidx_within (PG_FUNCTION_ARGS)
 
Datum gserialized_distance_nd (PG_FUNCTION_ARGS)
 
Datum gserialized_gidx_geom_same (PG_FUNCTION_ARGS)
 
Datum gserialized_gidx_gidx_same (PG_FUNCTION_ARGS)
 
static GIDX * gidx_copy (GIDX *b)
 
static void gidx_validate (GIDX *b)
 
static bool gidx_is_unknown (const GIDX *a)
 
static void gidx_set_unknown (GIDX *a)
 
static void gidx_merge (GIDX **b_union, GIDX *b_new)
 
static float gidx_volume (GIDX *a)
 
static float gidx_edge (GIDX *a)
 
static void gidx_dimensionality_check (GIDX **a, GIDX **b)
 
static float gidx_union_volume (GIDX *a, GIDX *b)
 
static float gidx_union_edge (GIDX *a, GIDX *b)
 
static float gidx_inter_volume (GIDX *a, GIDX *b)
 
static bool gidx_overlaps (GIDX *a, GIDX *b)
 
bool gidx_contains (GIDX *a, GIDX *b)
 
static bool gidx_equals (GIDX *a, GIDX *b)
 
static int gserialized_datum_predicate (Datum gs1, Datum gs2, gidx_predicate predicate)
 Support function. More...
 
static int gserialized_datum_predicate_gidx_geom (GIDX *gidx1, Datum gs2, gidx_predicate predicate)
 
static int gserialized_datum_predicate_geom_gidx (Datum gs1, GIDX *gidx2, gidx_predicate predicate)
 
static double gidx_distance (const GIDX *a, const GIDX *b, int m_is_time)
 Calculate the centroid->centroid distance between the boxes. More...
 
static double gidx_distance_m (const GIDX *a, const GIDX *b)
 
GSERIALIZEDgserialized_expand (GSERIALIZED *g, double distance)
 Return a GSERIALIZED with an expanded bounding box. More...
 
 PG_FUNCTION_INFO_V1 (gserialized_distance_nd)
 
 PG_FUNCTION_INFO_V1 (gserialized_within)
 
 PG_FUNCTION_INFO_V1 (gserialized_gidx_geom_within)
 
 PG_FUNCTION_INFO_V1 (gserialized_gidx_gidx_within)
 
 PG_FUNCTION_INFO_V1 (gserialized_contains)
 
 PG_FUNCTION_INFO_V1 (gserialized_gidx_geom_contains)
 
 PG_FUNCTION_INFO_V1 (gserialized_gidx_gidx_contains)
 
 PG_FUNCTION_INFO_V1 (gserialized_gidx_geom_same)
 
 PG_FUNCTION_INFO_V1 (gserialized_gidx_gidx_same)
 
 PG_FUNCTION_INFO_V1 (gserialized_overlaps)
 
 PG_FUNCTION_INFO_V1 (gserialized_gidx_geog_overlaps)
 
Datum gserialized_gidx_geog_overlaps (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (gserialized_gidx_geom_overlaps)
 
Datum gserialized_gidx_geom_overlaps (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (gserialized_gidx_gidx_overlaps)
 
Datum gserialized_gidx_gidx_overlaps (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (gserialized_gist_compress)
 
 PG_FUNCTION_INFO_V1 (gserialized_gist_decompress)
 
static bool gserialized_gist_consistent_leaf (GIDX *key, GIDX *query, StrategyNumber strategy)
 
static bool gserialized_gist_consistent_internal (GIDX *key, GIDX *query, StrategyNumber strategy)
 
 PG_FUNCTION_INFO_V1 (gserialized_gist_consistent)
 
static float pack_float (const float value, const int realm)
 
 PG_FUNCTION_INFO_V1 (gserialized_gist_penalty)
 
 PG_FUNCTION_INFO_V1 (gserialized_gist_union)
 
 PG_FUNCTION_INFO_V1 (gserialized_gist_same)
 
 PG_FUNCTION_INFO_V1 (gserialized_gist_geog_distance)
 
 PG_FUNCTION_INFO_V1 (gserialized_gist_distance)
 
static void gserialized_gist_picksplit_addlist (OffsetNumber *list, GIDX **box_union, GIDX *box_current, int *pos, int num)
 
static int gserialized_gist_picksplit_badratio (int x, int y)
 
static bool gserialized_gist_picksplit_badratios (int *pos, int dims)
 
static void gserialized_gist_picksplit_fallback (GistEntryVector *entryvec, GIST_SPLITVEC *v)
 
static void gserialized_gist_picksplit_constructsplit (GIST_SPLITVEC *v, OffsetNumber *list1, int nlist1, GIDX **union1, OffsetNumber *list2, int nlist2, GIDX **union2)
 
 PG_FUNCTION_INFO_V1 (gserialized_gist_picksplit)
 
 PG_FUNCTION_INFO_V1 (gidx_in)
 
 PG_FUNCTION_INFO_V1 (gidx_out)