MCPcopy Create free account
hub / github.com/OSGeo/gdal / CPLQuadTreeInsert

Function CPLQuadTreeInsert

port/cpl_quad_tree.cpp:330–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328 */
329
330void CPLQuadTreeInsert(CPLQuadTree *hQuadTree, void *hFeature)
331{
332 if (hQuadTree->pfnGetBounds == nullptr &&
333 hQuadTree->pfnGetBoundsEx == nullptr)
334 {
335 CPLError(CE_Failure, CPLE_AppDefined,
336 "hQuadTree->pfnGetBounds == NULL");
337 return;
338 }
339 hQuadTree->nFeatures++;
340 CPLRectObj bounds;
341 if (hQuadTree->pfnGetBoundsEx)
342 hQuadTree->pfnGetBoundsEx(hFeature, hQuadTree->pUserData, &bounds);
343 else
344 hQuadTree->pfnGetBounds(hFeature, &bounds);
345 CPLQuadTreeAddFeatureInternal(hQuadTree, hFeature, &bounds);
346}
347
348/************************************************************************/
349/* CPLQuadTreeInsertWithBounds() */

Callers 6

organizePolygonsMethod · 0.85
getClosestPointMethod · 0.85
GDALGeoLocBuildQuadTreeFunction · 0.85
LoadSourcesMethod · 0.85

Calls 2

CPLErrorFunction · 0.85

Tested by

no test coverage detected