33 #ifndef CPL_QUAD_TREE_H_INCLUDED
34 #define CPL_QUAD_TREE_H_INCLUDED
108 int* pnMaxBucketCapacity);
Core portability definitions for CPL.
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:303
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:301
CPLQuadTree * CPLQuadTreeCreate(const CPLRectObj *pGlobalBounds, CPLQuadTreeGetBoundsFunc pfnGetBounds)
Create a new quadtree.
Definition: cpl_quad_tree.cpp:150
void CPLQuadTreeRemove(CPLQuadTree *hQuadtree, void *hFeature, const CPLRectObj *psBounds)
Remove a feature from a quadtree.
Definition: cpl_quad_tree.cpp:383
void CPLQuadTreeInsert(CPLQuadTree *hQuadtree, void *hFeature)
Insert a feature into a quadtree.
Definition: cpl_quad_tree.cpp:272
int(* CPLQuadTreeForeachFunc)(void *pElt, void *pUserData)
CPLQuadTreeForeachFunc.
Definition: cpl_quad_tree.h:67
void(* CPLQuadTreeGetBoundsFunc)(const void *hFeature, CPLRectObj *pBounds)
CPLQuadTreeGetBoundsFunc.
Definition: cpl_quad_tree.h:65
void CPLQuadTreeGetStats(const CPLQuadTree *hQuadtree, int *pnFeatureCount, int *pnNodeCount, int *pnMaxDepth, int *pnMaxBucketCapacity)
Get stats.
Definition: cpl_quad_tree.cpp:952
void CPLQuadTreeDump(const CPLQuadTree *hQuadtree, CPLQuadTreeDumpFeatureFunc pfnDumpFeatureFunc, void *pUserData)
Dump quad tree.
Definition: cpl_quad_tree.cpp:916
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:851
void CPLQuadTreeSetBucketCapacity(CPLQuadTree *hQuadtree, int nBucketCapacity)
Set the maximum capacity of a node of a quadtree.
Definition: cpl_quad_tree.cpp:255
void CPLQuadTreeSetMaxDepth(CPLQuadTree *hQuadtree, int nMaxDepth)
Set the maximum depth of a quadtree.
Definition: cpl_quad_tree.cpp:237
void CPLQuadTreeDestroy(CPLQuadTree *hQuadtree)
Destroy a quadtree.
Definition: cpl_quad_tree.cpp:435
struct _CPLQuadTree CPLQuadTree
Opaque type for a quad tree.
Definition: cpl_quad_tree.h:62
void CPLQuadTreeInsertWithBounds(CPLQuadTree *hQuadtree, void *hFeature, const CPLRectObj *psBounds)
Insert a feature into a quadtree.
Definition: cpl_quad_tree.cpp:297
void(* CPLQuadTreeDumpFeatureFunc)(const void *hFeature, int nIndentLevel, void *pUserData)
CPLQuadTreeDumpFeatureFunc.
Definition: cpl_quad_tree.h:69
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:786
int CPLQuadTreeGetAdvisedMaxDepth(int nExpectedFeatures)
Returns the optimal depth of a quadtree to hold nExpectedFeatures.
Definition: cpl_quad_tree.cpp:189
Describe a rectangle.
Definition: cpl_quad_tree.h:54
double minx
Minimum x.
Definition: cpl_quad_tree.h:55
double maxy
Maximum y.
Definition: cpl_quad_tree.h:58
double miny
Minimum y.
Definition: cpl_quad_tree.h:56
double maxx
Maximum x.
Definition: cpl_quad_tree.h:57