PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ GetRtreeCache()

RTREE_POLY_CACHE* GetRtreeCache ( 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.

Otherwise builds a new one and returns that.

Definition at line 432 of file lwgeom_rtree.c.

433 {
434  RTreeGeomCache* cache = (RTreeGeomCache*)GetGeomCache(fcinfo, &RTreeCacheMethods, g1, NULL);
435  RTREE_POLY_CACHE* index = NULL;
436 
437  if ( cache )
438  index = cache->index;
439 
440  return index;
441 }
static GeomCacheMethods RTreeCacheMethods
Definition: lwgeom_rtree.c:423
The tree structure used for fast P-i-P tests by point_in_multipolygon_rtree()
Definition: lwgeom_rtree.h:59
RTREE_POLY_CACHE * index
Definition: lwgeom_rtree.h:69

References RTreeGeomCache::index, and RTreeCacheMethods.

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

Here is the caller graph for this function: