PostGIS  2.1.10dev-r@@SVN_REVISION@@
RTREE_POLY_CACHE* GetRtreeCache ( FunctionCallInfoData *  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.

Otherwise builds a new one and returns that.

Definition at line 418 of file lwgeom_rtree.c.

References RTreeGeomCache::index, and RTreeCacheMethods.

Referenced by contains(), coveredby(), covers(), and geos_intersects().

419 {
420  RTreeGeomCache* cache = (RTreeGeomCache*)GetGeomCache(fcinfo, &RTreeCacheMethods, g1, NULL);
421  RTREE_POLY_CACHE* index = NULL;
422 
423  if ( cache )
424  index = cache->index;
425 
426  return index;
427 }
The tree structure used for fast P-i-P tests by point_in_multipolygon_rtree()
Definition: lwgeom_rtree.h:33
static GeomCacheMethods RTreeCacheMethods
Definition: lwgeom_rtree.c:409
RTREE_POLY_CACHE * index
Definition: lwgeom_rtree.h:50

Here is the caller graph for this function: