GEOS 3.15.0dev
quadtree/Root.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 * Last port: index/quadtree/Root.java rev 1.7 (JTS-1.10)
16 *
17 **********************************************************************/
18
19#pragma once
20
21#include <geos/export.h>
22#include <geos/index/quadtree/NodeBase.h> // for inheritance
23#include <geos/geom/Coordinate.h> // for composition
24
25// Forward declarations
26namespace geos {
27namespace geom {
28class Envelope;
29}
30namespace index {
31namespace quadtree {
32class Node;
33}
34}
35}
36
37namespace geos {
38namespace index { // geos::index
39namespace quadtree { // geos::index::quadtree
40
48class GEOS_DLL Root: public NodeBase {
49
50private:
51
52 static const geom::Coordinate origin;
53
59 void insertContained(Node* tree, const geom::Envelope* itemEnv,
60 void* item);
61
62public:
63
64 Root() {}
65
66 ~Root() override {}
67
71 void insert(const geom::Envelope* itemEnv, void* item);
72
73protected:
74
75 bool
76 isSearchMatch(const geom::Envelope& /* searchEnv */) const override
77 {
78 return true;
79 }
80
81};
82
83} // namespace geos::index::quadtree
84} // namespace geos::index
85} // namespace geos
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
The base class for nodes in a Quadtree.
Definition quadtree/NodeBase.h:54
Represents a node of a Quadtree.
Definition index/quadtree/Node.h:54
QuadRoot is the root of a single Quadtree. It is centred at the origin, and does not have a defined e...
Definition quadtree/Root.h:48
void insert(const geom::Envelope *itemEnv, void *item)
Basic namespace for all GEOS functionalities.
Definition geos.h:38