Go to the documentation of this file.
33 #ifndef CPL_QUAD_TREE_H_INCLUDED
34 #define CPL_QUAD_TREE_H_INCLUDED
103 int* pnFeatureCount);
116 int* pnMaxBucketCapacity);
int CPLQuadTreeGetAdvisedMaxDepth(int nExpectedFeatures)
Returns the optimal depth of a quadtree to hold nExpectedFeatures.
Definition: cpl_quad_tree.cpp:247
void(* CPLQuadTreeDumpFeatureFunc)(const void *hFeature, int nIndentLevel, void *pUserData)
CPLQuadTreeDumpFeatureFunc.
Definition: cpl_quad_tree.h:73
void ** CPLQuadTreeSearch(const CPLQuadTree *hQuadtree, const CPLRectObj *pAoi, int *pnFeatureCount)
Returns all the elements inserted whose bounding box intersects the provided area of interest.
Definition: cpl_quad_tree.cpp:905
void CPLQuadTreeSetBucketCapacity(CPLQuadTree *hQuadtree, int nBucketCapacity)
Set the maximum capacity of a node of a quadtree.
Definition: cpl_quad_tree.cpp:313
double miny
Minimum y.
Definition: cpl_quad_tree.h:58
double maxy
Maximum y.
Definition: cpl_quad_tree.h:60
void CPLQuadTreeInsertWithBounds(CPLQuadTree *hQuadtree, void *hFeature, const CPLRectObj *psBounds)
Insert a feature into a quadtree.
Definition: cpl_quad_tree.cpp:375
struct _CPLQuadTree CPLQuadTree
Opaque type for a quad tree.
Definition: cpl_quad_tree.h:64
void CPLQuadTreeInsert(CPLQuadTree *hQuadtree, void *hFeature)
Insert a feature into a quadtree.
Definition: cpl_quad_tree.cpp:347
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:301
double maxx
Maximum x.
Definition: cpl_quad_tree.h:59
void CPLQuadTreeForeach(const CPLQuadTree *hQuadtree, CPLQuadTreeForeachFunc pfnForeach, void *pUserData)
Walk through the quadtree and runs the provided function on all the elements.
Definition: cpl_quad_tree.cpp:970
void CPLQuadTreeDump(const CPLQuadTree *hQuadtree, CPLQuadTreeDumpFeatureFunc pfnDumpFeatureFunc, void *pUserData)
Dump quad tree.
Definition: cpl_quad_tree.cpp:1035
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:303
CPLQuadTree * CPLQuadTreeCreate(const CPLRectObj *pGlobalBounds, CPLQuadTreeGetBoundsFunc pfnGetBounds)
Create a new quadtree.
Definition: cpl_quad_tree.cpp:154
Describe a rectangle.
Definition: cpl_quad_tree.h:56
void CPLQuadTreeRemove(CPLQuadTree *hQuadtree, void *hFeature, const CPLRectObj *psBounds)
Remove a feature from a quadtree.
Definition: cpl_quad_tree.cpp:461
double minx
Minimum x.
Definition: cpl_quad_tree.h:57
void CPLQuadTreeForceUseOfSubNodes(CPLQuadTree *hQuadTree)
Force the quadtree to insert as much as possible a feature whose bbox spread over multiple subnodes i...
Definition: cpl_quad_tree.cpp:331
int(* CPLQuadTreeForeachFunc)(void *pElt, void *pUserData)
CPLQuadTreeForeachFunc.
Definition: cpl_quad_tree.h:71
void CPLQuadTreeDestroy(CPLQuadTree *hQuadtree)
Destroy a quadtree.
Definition: cpl_quad_tree.cpp:517
CPLQuadTree * CPLQuadTreeCreateEx(const CPLRectObj *pGlobalBounds, CPLQuadTreeGetBoundsExFunc pfnGetBounds, void *pUserData)
Create a new quadtree.
Definition: cpl_quad_tree.cpp:203
void CPLQuadTreeSetMaxDepth(CPLQuadTree *hQuadtree, int nMaxDepth)
Set the maximum depth of a quadtree.
Definition: cpl_quad_tree.cpp:295
void(* CPLQuadTreeGetBoundsExFunc)(const void *hFeature, void *pUserData, CPLRectObj *pBounds)
CPLQuadTreeGetBoundsExFunc.
Definition: cpl_quad_tree.h:69
void CPLQuadTreeGetStats(const CPLQuadTree *hQuadtree, int *pnFeatureCount, int *pnNodeCount, int *pnMaxDepth, int *pnMaxBucketCapacity)
Get stats.
Definition: cpl_quad_tree.cpp:1071
void(* CPLQuadTreeGetBoundsFunc)(const void *hFeature, CPLRectObj *pBounds)
CPLQuadTreeGetBoundsFunc.
Definition: cpl_quad_tree.h:67