GEOS 3.9.1
SpatialIndex.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_INDEX_SPATIALINDEX_H
16#define GEOS_INDEX_SPATIALINDEX_H
17
18#include <geos/export.h>
19
20#include <vector>
21
22// Forward declarations
23namespace geos {
24namespace geom {
25class Envelope;
26}
27namespace index {
28class ItemVisitor;
29}
30}
31
32namespace geos {
33namespace index {
34
47class GEOS_DLL SpatialIndex {
48public:
49
50 virtual
51 ~SpatialIndex() {}
52
65 virtual void insert(const geom::Envelope* itemEnv, void* item) = 0;
66
76 //virtual std::vector<void*>* query(const geom::Envelope *searchEnv)=0;
77 virtual void query(const geom::Envelope* searchEnv, std::vector<void*>&) = 0;
78
89 virtual void query(const geom::Envelope* searchEnv, ItemVisitor& visitor) = 0;
90
98 virtual bool remove(const geom::Envelope* itemEnv, void* item) = 0;
99
100};
101
102
103} // namespace geos.index
104} // namespace geos
105
106#endif // GEOS_INDEX_SPATIALINDEX_H
107
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:58
A visitor for items in an index.
Definition ItemVisitor.h:29
Abstract class defines basic insertion and query operations supported by classes implementing spatial...
Definition SpatialIndex.h:47
virtual bool remove(const geom::Envelope *itemEnv, void *item)=0
Removes a single item from the tree.
virtual void insert(const geom::Envelope *itemEnv, void *item)=0
Adds a spatial item with an extent specified by the given Envelope to the index.
virtual void query(const geom::Envelope *searchEnv, ItemVisitor &visitor)=0
Queries the index for all items whose extents intersect the given search Envelope and applies an Item...
virtual void query(const geom::Envelope *searchEnv, std::vector< void * > &)=0
Queries the index for all items whose extents intersect the given search Envelope.
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26