GEOS: SpatialIndex.h Source File

GEOS 3.5.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

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
23 namespace geos {
24 namespace geom {
25 class Envelope;
26 }
27 namespace index {
28 class ItemVisitor;
29 }
30 }
31
32 namespace geos {
33 namespace index {
34
47 class GEOS_DLL SpatialIndex {
48 public:
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
geos::geom::Envelope
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:53
geos::index::SpatialIndex
Abstract class defines basic insertion and query operations supported by classes implementing spatial...
Definition: SpatialIndex.h:47
geos::index::ItemVisitor
A visitor for items in an index.
Definition: ItemVisitor.h:29
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25