00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GEOS_IDX_BINTREE_BINTREE_H
00016 #define GEOS_IDX_BINTREE_BINTREE_H
00017
00018 #include <geos/export.h>
00019 #include <vector>
00020
00021 #ifdef _MSC_VER
00022 #pragma warning(push)
00023 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00024 #endif
00025
00026
00027 namespace geos {
00028 namespace index {
00029 namespace bintree {
00030 class Interval;
00031 class Root;
00032 }
00033 }
00034 }
00035
00036 namespace geos {
00037 namespace index {
00038 namespace bintree {
00039
00056 class GEOS_DLL Bintree {
00057
00058 public:
00059
00070 static Interval* ensureExtent(const Interval *itemInterval,
00071 double minExtent);
00072
00073 Bintree();
00074
00075 ~Bintree();
00076
00077 int depth();
00078
00079 int size();
00080
00081 int nodeSize();
00082
00089 void insert(Interval *itemInterval, void* item);
00090
00091 std::vector<void*>* iterator();
00092
00093 std::vector<void*>* query(double x);
00094
00095 std::vector<void*>* query(Interval *interval);
00096
00097 void query(Interval *interval,
00098 std::vector<void*> *foundItems);
00099
00100 private:
00101
00102 std::vector<Interval *>newIntervals;
00103
00104 Root *root;
00105
00116 double minExtent;
00117
00118 void collectStats(Interval *interval);
00119 };
00120
00121 }
00122 }
00123 }
00124
00125 #ifdef _MSC_VER
00126 #pragma warning(pop)
00127 #endif
00128
00129 #endif // GEOS_IDX_BINTREE_BINTREE_H
00130