GEOS 3.9.1
bintree/Key.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_KEY_H
16#define GEOS_IDX_BINTREE_KEY_H
17
18#include <geos/export.h>
19
20// Forward declarations
21namespace geos {
22namespace index {
23namespace bintree {
24class Interval;
25}
26}
27}
28
29namespace geos {
30namespace index { // geos::index
31namespace bintree { // geos::index::bintree
32
39class GEOS_DLL Key {
40
41public:
42
43 static int computeLevel(Interval* newInterval);
44
45 Key(Interval* newInterval);
46
47 ~Key();
48
49 double getPoint();
50
51 int getLevel();
52
53 Interval* getInterval();
54
55 void computeKey(Interval* itemInterval);
56
57private:
58
59 // the fields which make up the key
60 double pt;
61 int level;
62
63 // auxiliary data which is derived from the key for use in computation
64 Interval* interval;
65
66 void computeInterval(int level, Interval* itemInterval);
67};
68
69} // namespace geos::index::bintree
70} // namespace geos::index
71} // namespace geos
72
73#endif // GEOS_IDX_BINTREE_KEY_H
74
Represents an (1-dimensional) closed interval on the Real number line.
Definition bintree/Interval.h:25
A Key is a unique identifier for a node in a tree.
Definition bintree/Key.h:39
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26