GEOS 3.6.2
index/bintree/Node.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_NODE_H
16#define GEOS_IDX_BINTREE_NODE_H
17
18#include <geos/export.h>
19#include <geos/index/bintree/NodeBase.h> // for inheritance
20
21// Forward declarations
22namespace geos {
23 namespace index {
24 namespace bintree {
25 class Interval;
26 }
27 }
28}
29
30namespace geos {
31namespace index { // geos::index
32namespace bintree { // geos::index::bintree
33
35class GEOS_DLL Node: public NodeBase {
36
37public:
38
39 static Node* createNode(Interval *itemInterval);
40
41 static Node* createExpanded(Node *node,Interval *addInterval);
42
43 Node(Interval *newInterval,int newLevel);
44
45 ~Node();
46
47 Interval* getInterval();
48
49 Node* getNode(Interval *searchInterval);
50
51 NodeBase* find(Interval *searchInterval);
52
53 void insert(Node *node);
54
55private:
56
57 Interval *interval;
58
59 double centre;
60
61 int level;
62
63 Node* getSubnode(int index);
64
65 Node* createSubnode(int index);
66
67protected:
68
69 bool isSearchMatch(Interval *itemInterval);
70};
71
72} // namespace geos::index::bintree
73} // namespace geos::index
74} // namespace geos
75
76#endif // GEOS_IDX_BINTREE_NODE_H
77
Represents an (1-dimensional) closed interval on the Real number line.
Definition bintree/Interval.h:25
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