GEOS: SortedPackedIntervalRTree.h Source File

GEOS 3.5.0

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

- File List

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
22 namespace geos {
23 namespace index {
24 class ItemVisitor;
25 }
26 }
27
28 namespace geos {
29 namespace index {
30 namespace intervalrtree {
31
49 class SortedPackedIntervalRTree
50 {
51 private:
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
60 protected:
61 public:
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
geos::index::intervalrtree::SortedPackedIntervalRTree
A static index on a set of 1-dimensional intervals, using an R-Tree packed based on the order of the ...
Definition: SortedPackedIntervalRTree.h:49
geos::index::ItemVisitor
A visitor for items in an index.
Definition: ItemVisitor.h:29
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25