GEOS
3.6.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2006 Refractions Research Inc. 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 **********************************************************************/ 00014 00015 #ifndef GEOS_INDEX_SPATIALINDEX_H 00016 #define GEOS_INDEX_SPATIALINDEX_H 00017 00018 #include <geos/export.h> 00019 00020 #include <vector> 00021 00022 // Forward declarations 00023 namespace geos { 00024 namespace geom { 00025 class Envelope; 00026 } 00027 namespace index { 00028 class ItemVisitor; 00029 } 00030 } 00031 00032 namespace geos { 00033 namespace index { 00034 00047 class GEOS_DLL SpatialIndex { 00048 public: 00049 00050 virtual ~SpatialIndex() {} 00051 00064 virtual void insert(const geom::Envelope *itemEnv, void *item) = 0; 00065 00075 //virtual std::vector<void*>* query(const geom::Envelope *searchEnv)=0; 00076 virtual void query(const geom::Envelope* searchEnv, std::vector<void*>&) = 0; 00077 00088 virtual void query(const geom::Envelope *searchEnv, ItemVisitor& visitor) = 0; 00089 00097 virtual bool remove(const geom::Envelope* itemEnv, void* item) = 0; 00098 00099 }; 00100 00101 00102 } // namespace geos.index 00103 } // namespace geos 00104 00105 #endif // GEOS_INDEX_SPATIALINDEX_H 00106