PostGIS  2.5.7dev-r@@SVN_REVISION@@
lwgeom_rtree.c File Reference
#include <assert.h>
#include "../postgis_config.h"
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "liblwgeom_internal.h"
#include "lwgeom_cache.h"
#include "lwgeom_rtree.h"
Include dependency graph for lwgeom_rtree.c:

Go to the source code of this file.

Functions

static void RTreeFree (RTREE_NODE *root)
 Recursively frees the child nodes, the interval and the line before freeing the root node. More...
 
static RTREE_POLY_CACHERTreeCacheCreate ()
 Allocate a fresh clean RTREE_POLY_CACHE. More...
 
static void RTreeCacheClear (RTREE_POLY_CACHE *cache)
 Free the cache object and all the sub-objects properly. More...
 
static uint32 IntervalIsContained (RTREE_INTERVAL *interval, double value)
 Returns 1 if min < value <= max, 0 otherwise. More...
 
static RTREE_INTERVALRTreeMergeIntervals (RTREE_INTERVAL *inter1, RTREE_INTERVAL *inter2)
 Creates an interval with the total extents of the two given intervals. More...
 
static RTREE_INTERVALRTreeCreateInterval (double value1, double value2)
 Creates an interval given the min and max values, in arbitrary order. More...
 
static RTREE_NODERTreeCreateInteriorNode (RTREE_NODE *left, RTREE_NODE *right)
 Creates an interior node given the children. More...
 
static RTREE_NODERTreeCreateLeafNode (POINTARRAY *pa, uint32_t startPoint)
 Creates a leaf node given the pointer to the start point of the segment. More...
 
static RTREE_NODERTreeCreate (POINTARRAY *pointArray)
 Creates an rtree given a pointer to the point array. More...
 
static LWMLINERTreeMergeMultiLines (LWMLINE *line1, LWMLINE *line2)
 Merges two multilinestrings into a single multilinestring. More...
 
static int RTreeBuilder (const LWGEOM *lwgeom, GeomCache *cache)
 Callback function sent into the GetGeomCache generic caching system. More...
 
static int RTreeFreer (GeomCache *cache)
 Callback function sent into the GetGeomCache generic caching system. More...
 
static GeomCache * RTreeAllocator (void)
 
RTREE_POLY_CACHEGetRtreeCache (FunctionCallInfo fcinfo, GSERIALIZED *g1)
 Checks for a cache hit against the provided geometry and returns a pre-built index structure (RTREE_POLY_CACHE) if one exists. More...
 
LWMLINERTreeFindLineSegments (RTREE_NODE *root, double value)
 Retrieves a collection of line segments given the root and crossing value. More...
 

Variables

static GeomCacheMethods RTreeCacheMethods