org.geotools.index.quadtree.QuadTree.search()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中org.geotools.index.quadtree.QuadTree.search方法的一些代码示例,展示了QuadTree.search的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuadTree.search方法的具体详情如下:
包路径:org.geotools.index.quadtree.QuadTree
类名称:QuadTree
方法名:search

QuadTree.search介绍

暂无

代码示例

代码示例来源:origin: org.geotools/gt2-shapefile-renderer

/**
 * QuadTree Query
 * 
 * @param bbox
 * @return
 * @throws DataSourceException
 * @throws IOException
 * @throws TreeException DOCUMENT ME!
 */
Collection queryQuadTree( Envelope bbox ) throws DataSourceException, IOException, TreeException {
  Collection tmp = null;
  try {
    // old code was checking the resulting collection wasn't empty and it that
    // case it closed the qtree straight away. qtree gets closed anyways with
    // this code path, but it's quite a bit faster because it avoid one disk access
    // just to check the collection is not empty
    if ((qtree != null) && !bbox.contains(qtree.getRoot().getBounds()))
      return qtree.search(bbox);
  }catch (Exception e) {
    ShapefileRenderer.LOGGER.warning(e.getLocalizedMessage());
  }
  return null;
}

代码示例来源:origin: org.geotools/gt-shapefile-renderer

/**
 * QuadTree Query
 * 
 * @param bbox
 * @return
 * @throws DataSourceException
 * @throws IOException
 * @throws TreeException
 *                 DOCUMENT ME!
 */
CloseableIterator<Data> queryQuadTree(Envelope bbox) throws DataSourceException,
    IOException, TreeException {
  try {
    // old code was checking the resulting collection wasn't empty and
    // it that
    // case it closed the qtree straight away. qtree gets closed anyways
    // with
    // this code path, but it's quite a bit faster because it avoid one
    // disk access
    // just to check the collection is not empty
    if ((qtree != null) && !bbox.contains(qtree.getRoot().getBounds()))
      return qtree.search(bbox);
  } catch (Exception e) {
    ShapefileRenderer.LOGGER.warning(e.getLocalizedMessage());
  }
  return null;
}

代码示例来源:origin: org.geotools/gt2-shapefile

/**
 * QuadTree Query
 *
 * @param bbox
 *
 *
 * @throws DataSourceException
 * @throws IOException
 * @throws TreeException
 *             DOCUMENT ME!
 */
private Collection queryQuadTree(Envelope bbox) throws DataSourceException,
    IOException, TreeException {
  Collection tmp = null;
  try {
    QuadTree quadTree=openQuadTree();
    if ((quadTree != null) && !bbox.contains(quadTree.getRoot().getBounds())) {
      tmp = quadTree.search(bbox);
      
      if( tmp==null || !tmp.isEmpty())
        return tmp;
    }
    if( quadTree!=null )
      quadTree.close();
  }catch (Exception e) {
    throw new DataSourceException("Error querying QuadTree", e);
  }
  return null;
}

代码示例来源:origin: org.geotools/gt-shapefile

if ((quadTree != null)
    && !bbox.contains(quadTree.getRoot().getBounds())) {
  tmp = quadTree.search(bbox);

代码示例来源:origin: org.geotools/gt-shapefile-old

if ((quadTree != null)
    && !bbox.contains(quadTree.getRoot().getBounds())) {
  tmp = quadTree.search(bbox);

相关文章