GEOS 3.6.2
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 {
24 namespace geom {
25 class Envelope;
26 }
27 namespace index {
28 class ItemVisitor;
29 }
30}
31
32namespace geos {
33namespace index {
34
47class GEOS_DLL SpatialIndex {
48public:
49
50 virtual ~SpatialIndex() {}
51
64 virtual void insert(const geom::Envelope *itemEnv, void *item) = 0;
65
75 //virtual std::vector<void*>* query(const geom::Envelope *searchEnv)=0;
76 virtual void query(const geom::Envelope* searchEnv, std::vector<void*>&) = 0;
77
88 virtual void query(const geom::Envelope *searchEnv, ItemVisitor& visitor) = 0;
89
97 virtual bool remove(const geom::Envelope* itemEnv, void* item) = 0;
98
99};
100
101
102} // namespace geos.index
103} // namespace geos
104
105#endif // GEOS_INDEX_SPATIALINDEX_H
106
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:53
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.
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Provides classes for various kinds of spatial indexes.
Definition IndexedNestedRingTester.h:31
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25