PostGIS  2.4.9dev-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.

References RTreeGeomCache::index, and RTreeCacheMethods.

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

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 }
The tree structure used for fast P-i-P tests by point_in_multipolygon_rtree()
Definition: lwgeom_rtree.h:57
static GeomCacheMethods RTreeCacheMethods
Definition: lwgeom_rtree.c:423
RTREE_POLY_CACHE * index
Definition: lwgeom_rtree.h:74
Here is the caller graph for this function: