GEOS  3.8.0dev
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.
12  *
13  **********************************************************************
14  *
15  * Last port: index/quadtree/Root.java rev 1.7 (JTS-1.10)
16  *
17  **********************************************************************/
18
21
22 #include <geos/export.h>
23 #include <geos/index/quadtree/NodeBase.h> // for inheritance
24 #include <geos/geom/Coordinate.h> // for composition
25
26 // Forward declarations
27 namespace geos {
28 namespace geom {
29 class Envelope;
30 }
31 namespace index {
33 class Node;
34 }
35 }
36 }
37
38 namespace geos {
39 namespace index { // geos::index
41
49 class GEOS_DLL Root: public NodeBase {
51
52 private:
53
54  static const geom::Coordinate origin;
55
61  void insertContained(Node* tree, const geom::Envelope* itemEnv,
62  void* item);
63
64 public:
65
66  Root() {}
67
68  ~Root() override {}
69
73  void insert(const geom::Envelope* itemEnv, void* item);
74
75 protected:
76
77  bool
78  isSearchMatch(const geom::Envelope& /* searchEnv */) const override
79  {
80  return true;
81  }
82
83 };
84
86 } // namespace geos::index
87 } // namespace geos
88
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
QuadRoot is the root of a single Quadtree. It is centred at the origin, and does not have a defined e...