MCPcopy Index your code
hub / github.com/MapServer/MapServer / msSearchDiskTree

Function msSearchDiskTree

maptree.c:510–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510ms_bitarray msSearchDiskTree(char *filename, rectObj aoi, int debug)
511{
512 SHPTreeHandle disktree;
513 ms_bitarray status=NULL;
514
515 disktree = msSHPDiskTreeOpen (filename, debug);
516 if(!disktree) {
517
518 /* only set this error IF debugging is turned on, gets annoying otherwise */
519 if(debug) msSetError(MS_NOTFOUND, "Unable to open spatial index for %s. In most cases you can safely ignore this message, otherwise check file names and permissions.", "msSearchDiskTree()", filename);
520
521 return(NULL);
522 }
523
524 status = msAllocBitArray(disktree->nShapes);
525 if(!status) {
526 msSetError(MS_MEMERR, NULL, "msSearchDiskTree()");
527 msSHPDiskTreeClose( disktree );
528 return(NULL);
529 }
530
531 searchDiskTreeNode(disktree, aoi, status);
532
533 msSHPDiskTreeClose( disktree );
534 return(status);
535}
536
537treeNodeObj *readTreeNode( SHPTreeHandle disktree )
538{

Callers 2

mainFunction · 0.85
msShapefileWhichShapesFunction · 0.85

Calls 5

msSHPDiskTreeOpenFunction · 0.85
msSetErrorFunction · 0.85
msAllocBitArrayFunction · 0.85
msSHPDiskTreeCloseFunction · 0.85
searchDiskTreeNodeFunction · 0.85

Tested by

no test coverage detected