GEOS 3.6.2
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#ifndef GEOS_IDX_QUADTREE_ROOT_H
20#define GEOS_IDX_QUADTREE_ROOT_H
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
27namespace geos {
28 namespace geom {
29 class Envelope;
30 }
31 namespace index {
32 namespace quadtree {
33 class Node;
34 }
35 }
36}
37
38namespace geos {
39namespace index { // geos::index
40namespace quadtree { // geos::index::quadtree
41
49class GEOS_DLL Root: public NodeBase {
50//friend class Unload;
51
52private:
53
54 static const geom::Coordinate origin;
55
61 void insertContained(Node *tree, const geom::Envelope *itemEnv,
62 void* item);
63
64public:
65
66 Root() {}
67
68 virtual ~Root() {}
69
73 void insert(const geom::Envelope *itemEnv, void* item);
74
75protected:
76
77 bool isSearchMatch(const geom::Envelope& /* searchEnv */) const {
78 return true;
79 }
80
81};
82
83} // namespace geos::index::quadtree
84} // namespace geos::index
85} // namespace geos
86
87#endif // GEOS_IDX_QUADTREE_ROOT_H
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:53
Represents a node of a Quadtree.
Definition index/quadtree/Node.h:55
void insert(const geom::Envelope *itemEnv, void *item)
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Contains classes that implement a Quadtree spatial index.
Definition DoubleBits.h:29
Provides classes for various kinds of spatial indexes.
Definition IndexedNestedRingTester.h:31
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25