GEOS 3.6.2
Bintree.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#ifndef GEOS_IDX_BINTREE_BINTREE_H
16#define GEOS_IDX_BINTREE_BINTREE_H
17
18#include <geos/export.h>
19#include <vector>
20
21#ifdef _MSC_VER
22#pragma warning(push)
23#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
24#endif
25
26// Forward declarations
27namespace geos {
28 namespace index {
29 namespace bintree {
30 class Interval;
31 class Root;
32 }
33 }
34}
35
36namespace geos {
37namespace index { // geos::index
38namespace bintree { // geos::index::bintree
39
56class GEOS_DLL Bintree {
57
58public:
59
70 static Interval* ensureExtent(const Interval *itemInterval,
71 double minExtent);
72
73 Bintree();
74
75 ~Bintree();
76
77 int depth();
78
79 int size();
80
81 int nodeSize();
82
89 void insert(Interval *itemInterval, void* item);
90
91 std::vector<void*>* iterator();
92
93 std::vector<void*>* query(double x);
94
95 std::vector<void*>* query(Interval *interval);
96
97 void query(Interval *interval,
98 std::vector<void*> *foundItems);
99
100private:
101
102 std::vector<Interval *>newIntervals;
103
104 Root *root;
105
116 double minExtent;
117
118 void collectStats(Interval *interval);
119};
120
121} // namespace geos::index::bintree
122} // namespace geos::index
123} // namespace geos
124
125#ifdef _MSC_VER
126#pragma warning(pop)
127#endif
128
129#endif // GEOS_IDX_BINTREE_BINTREE_H
130
static Interval * ensureExtent(const Interval *itemInterval, double minExtent)
void insert(Interval *itemInterval, void *item)
Represents an (1-dimensional) closed interval on the Real number line.
Definition bintree/Interval.h:25
The root node of a single Bintree.
Definition bintree/Root.h:41
Contains classes that implement a Binary Interval Tree index.
Definition MCPointInRing.h:37
Provides classes for various kinds of spatial indexes.
Definition IndexedNestedRingTester.h:31
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25