GEOS 3.6.2
SortedPackedIntervalRTree.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2006 Refractions Research Inc.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 *
14 **********************************************************************/
15
16#ifndef GEOS_INDEX_INTERVALRTREE_SORTEDPACKEDINTERVALRTREE_H
17#define GEOS_INDEX_INTERVALRTREE_SORTEDPACKEDINTERVALRTREE_H
18
19#include <geos/index/intervalrtree/IntervalRTreeNode.h>
20
21// forward declarations
22namespace geos {
23 namespace index {
24 class ItemVisitor;
25 }
26}
27
28namespace geos {
29namespace index {
30namespace intervalrtree {
31
49class SortedPackedIntervalRTree
50{
51private:
52 IntervalRTreeNode::ConstVect * leaves;
53 const IntervalRTreeNode * root;
54 int level;
55
56 void init();
57 void buildLevel( IntervalRTreeNode::ConstVect * src, IntervalRTreeNode::ConstVect * dest);
58 const IntervalRTreeNode * buildTree();
59
60protected:
61public:
62 SortedPackedIntervalRTree();
63
64 ~SortedPackedIntervalRTree();
65
75 void insert( double min, double max, void * item);
76
85 void query( double min, double max, index::ItemVisitor * visitor);
86
87};
88
89} // geos::intervalrtree
90} // geos::index
91} // geos
92
93#endif // GEOS_INDEX_INTERVALRTREE_SORTEDPACKEDINTERVALRTREE_H
94
A visitor for items in an index.
Definition ItemVisitor.h:29
void query(double min, double max, index::ItemVisitor *visitor)
void insert(double min, double max, void *item)
Provides classes for various kinds of spatial indexes.
Definition IndexedNestedRingTester.h:31
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25