Ejemplo n.º 1
0
ms_bitarray msSearchDiskTree(struct zzip_dir *zdir, const char *filename, rectObj aoi, int debug)
{
  SHPTreeHandle disktree;
  ms_bitarray status=NULL;

  disktree = msSHPDiskTreeOpen(zdir, filename, debug);
  if(!disktree) {

    /* only set this error IF debugging is turned on, gets annoying otherwise */
    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);

    return(NULL);
  }

  status = msAllocBitArray(disktree->nShapes);
  if(!status) {
    msSetError(MS_MEMERR, NULL, "msSearchDiskTree()");
    msSHPDiskTreeClose( disktree );
    return(NULL);
  }

  searchDiskTreeNode(disktree, aoi, status);

  msSHPDiskTreeClose( disktree );
  return(status);
}
Ejemplo n.º 2
0
ms_bitarray msSearchTree(treeObj *tree, rectObj aoi)
{
  ms_bitarray status=NULL;

  status = msAllocBitArray(tree->numshapes);
  if(!status) {
    msSetError(MS_MEMERR, NULL, "msSearchTree()");
    return(NULL);
  }

  treeCollectShapeIds(tree->root, aoi, status);

  return(status);
}
Ejemplo n.º 3
0
char *msSearchTree(treeObj *tree, rectObj aoi)
{
    char *status=NULL;

    status = msAllocBitArray(tree->numshapes);
    if(!status) {
#if MAPSHAPEERROR
        msSetError(MS_MEMERR, NULL, "msSearchTree()");
#endif
        return(NULL);
    }

    treeCollectShapeIds(tree->root, aoi, status);

    return(status);
}