PostGIS  2.1.10dev-r@@SVN_REVISION@@
gserialized_gist_2d.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 "liblwgeom_internal.h"
Include dependency graph for gserialized_gist_2d.c:

Go to the source code of this file.

Data Structures

struct  CommonEntry
struct  ConsiderSplitContext
struct  SplitInterval


#define LIMIT_RATIO   0.1
#define KOROTKOV_SPLIT   1
#define PLACE_LEFT(box, off)
#define PLACE_RIGHT(box, off)


typedef bool(* box2df_predicate) (const BOX2DF *a, const BOX2DF *b)


Datum box2df_out (PG_FUNCTION_ARGS)
Datum box2df_in (PG_FUNCTION_ARGS)
Datum gserialized_gist_consistent_2d (PG_FUNCTION_ARGS)
Datum gserialized_gist_compress_2d (PG_FUNCTION_ARGS)
Datum gserialized_gist_decompress_2d (PG_FUNCTION_ARGS)
Datum gserialized_gist_penalty_2d (PG_FUNCTION_ARGS)
Datum gserialized_gist_picksplit_2d (PG_FUNCTION_ARGS)
Datum gserialized_gist_union_2d (PG_FUNCTION_ARGS)
Datum gserialized_gist_same_2d (PG_FUNCTION_ARGS)
Datum gserialized_gist_distance_2d (PG_FUNCTION_ARGS)
Datum gserialized_same_2d (PG_FUNCTION_ARGS)
Datum gserialized_within_2d (PG_FUNCTION_ARGS)
Datum gserialized_contains_2d (PG_FUNCTION_ARGS)
Datum gserialized_overlaps_2d (PG_FUNCTION_ARGS)
Datum gserialized_left_2d (PG_FUNCTION_ARGS)
Datum gserialized_right_2d (PG_FUNCTION_ARGS)
Datum gserialized_above_2d (PG_FUNCTION_ARGS)
Datum gserialized_below_2d (PG_FUNCTION_ARGS)
Datum gserialized_overleft_2d (PG_FUNCTION_ARGS)
Datum gserialized_overright_2d (PG_FUNCTION_ARGS)
Datum gserialized_overabove_2d (PG_FUNCTION_ARGS)
Datum gserialized_overbelow_2d (PG_FUNCTION_ARGS)
Datum gserialized_distance_box_2d (PG_FUNCTION_ARGS)
Datum gserialized_distance_centroid_2d (PG_FUNCTION_ARGS)
static BOX2DF * box2df_copy (BOX2DF *b)
static void box2df_merge (BOX2DF *b_union, BOX2DF *b_new)
static float box2df_size (const BOX2DF *a)
static float box2df_union_size (const BOX2DF *a, const BOX2DF *b)
static int box2df_from_gbox_p (GBOX *box, BOX2DF *a)
static void box2df_validate (BOX2DF *b)
static bool box2df_overlaps (const BOX2DF *a, const BOX2DF *b)
static bool box2df_contains (const BOX2DF *a, const BOX2DF *b)
static bool box2df_within (const BOX2DF *a, const BOX2DF *b)
static bool box2df_equals (const BOX2DF *a, const BOX2DF *b)
static bool box2df_overleft (const BOX2DF *a, const BOX2DF *b)
static bool box2df_left (const BOX2DF *a, const BOX2DF *b)
static bool box2df_right (const BOX2DF *a, const BOX2DF *b)
static bool box2df_overright (const BOX2DF *a, const BOX2DF *b)
static bool box2df_overbelow (const BOX2DF *a, const BOX2DF *b)
static bool box2df_below (const BOX2DF *a, const BOX2DF *b)
static bool box2df_above (const BOX2DF *a, const BOX2DF *b)
static bool box2df_overabove (const BOX2DF *a, const BOX2DF *b)
static double box2df_distance_leaf_centroid (const BOX2DF *a, const BOX2DF *b)
 Calculate the centroid->centroid distance between the boxes. More...
static double box2df_distance_node_centroid (const BOX2DF *node, const BOX2DF *query)
 Calculate the The node_box_edge->query_centroid distance between the boxes. More...
static double pt_distance (double ax, double ay, double bx, double by)
static double box2df_distance (const BOX2DF *a, const BOX2DF *b)
 Calculate the box->box distance. More...
static int gserialized_datum_get_box2df_p (Datum gsdatum, BOX2DF *box2df)
 Peak into a GSERIALIZED datum to find the bounding box. More...
static int gserialized_datum_predicate_2d (Datum gs1, Datum gs2, box2df_predicate predicate)
 Support function. More...
 PG_FUNCTION_INFO_V1 (gserialized_distance_centroid_2d)
 PG_FUNCTION_INFO_V1 (gserialized_distance_box_2d)
 PG_FUNCTION_INFO_V1 (gserialized_same_2d)
 PG_FUNCTION_INFO_V1 (gserialized_within_2d)
 PG_FUNCTION_INFO_V1 (gserialized_contains_2d)
 PG_FUNCTION_INFO_V1 (gserialized_overlaps_2d)
 PG_FUNCTION_INFO_V1 (gserialized_left_2d)
 PG_FUNCTION_INFO_V1 (gserialized_right_2d)
 PG_FUNCTION_INFO_V1 (gserialized_above_2d)
 PG_FUNCTION_INFO_V1 (gserialized_below_2d)
 PG_FUNCTION_INFO_V1 (gserialized_overleft_2d)
 PG_FUNCTION_INFO_V1 (gserialized_overright_2d)
 PG_FUNCTION_INFO_V1 (gserialized_overabove_2d)
 PG_FUNCTION_INFO_V1 (gserialized_overbelow_2d)
 PG_FUNCTION_INFO_V1 (gserialized_gist_compress_2d)
 PG_FUNCTION_INFO_V1 (gserialized_gist_decompress_2d)
static bool gserialized_gist_consistent_leaf_2d (BOX2DF *key, BOX2DF *query, StrategyNumber strategy)
static bool gserialized_gist_consistent_internal_2d (BOX2DF *key, BOX2DF *query, StrategyNumber strategy)
 PG_FUNCTION_INFO_V1 (gserialized_gist_consistent_2d)
 PG_FUNCTION_INFO_V1 (gserialized_gist_distance_2d)
 PG_FUNCTION_INFO_V1 (gserialized_gist_penalty_2d)
 PG_FUNCTION_INFO_V1 (gserialized_gist_union_2d)
 PG_FUNCTION_INFO_V1 (gserialized_gist_same_2d)
static void adjustBox (BOX2DF *b, BOX2DF *addon)
static void fallbackSplit (GistEntryVector *entryvec, GIST_SPLITVEC *v)
static int interval_cmp_lower (const void *i1, const void *i2)
static int interval_cmp_upper (const void *i1, const void *i2)
static float non_negative (float val)
static void g_box_consider_split (ConsiderSplitContext *context, int dimNum, float rightLower, int minLeftCount, float leftUpper, int maxLeftCount)
static float box_penalty (BOX2DF *original, BOX2DF *new)
static int common_entry_cmp (const void *i1, const void *i2)
 PG_FUNCTION_INFO_V1 (gserialized_gist_picksplit_2d)
 PG_FUNCTION_INFO_V1 (box2df_in)
 PG_FUNCTION_INFO_V1 (box2df_out)