GEOS 3.3.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

SortedPackedIntervalRTree.h
1 /**********************************************************************
2 * $Id: SortedPackedIntervalRTree.h 2540 2009-06-05 09:28:04Z strk $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 *
15 **********************************************************************/
16
17 #ifndef GEOS_INDEX_INTERVALRTREE_SORTEDPACKEDINTERVALRTREE_H
18 #define GEOS_INDEX_INTERVALRTREE_SORTEDPACKEDINTERVALRTREE_H
19
20 #include <geos/index/intervalrtree/IntervalRTreeNode.h>
21
22 // forward declarations
23 namespace geos {
24 namespace index {
25 class ItemVisitor;
26 }
27 }
28
29 namespace geos {
30 namespace index {
31 namespace intervalrtree {
32
50 class SortedPackedIntervalRTree
51 {
52 private:
53 IntervalRTreeNode::ConstVect * leaves;
54 const IntervalRTreeNode * root;
55 int level;
56
57 void init();
58 void buildLevel( IntervalRTreeNode::ConstVect * src, IntervalRTreeNode::ConstVect * dest);
59 const IntervalRTreeNode * buildTree();
60
61 protected:
62 public:
63 SortedPackedIntervalRTree();
64
65 ~SortedPackedIntervalRTree();
66
76 void insert( double min, double max, void * item);
77
86 void query( double min, double max, index::ItemVisitor * visitor);
87
88 };
89
90 } // geos::intervalrtree
91 } // geos::index
92 } // geos
93
94 #endif // GEOS_INDEX_INTERVALRTREE_SORTEDPACKEDINTERVALRTREE_H
95 /**********************************************************************
96 * $Log$
97 **********************************************************************/
98