SpatialIndex.h

00001 /**********************************************************************
00002  * $Id: SpatialIndex.h 1820 2006-09-06 16:54:23Z mloskot $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2006 Refractions Research Inc.
00008  *
00009  * This is free software; you can redistribute and/or modify it under
00010  * the terms of the GNU Lesser General Public Licence as published
00011  * by the Free Software Foundation. 
00012  * See the COPYING file for more information.
00013  *
00014  **********************************************************************/
00015 
00016 #ifndef GEOS_INDEX_SPATIALINDEX_H
00017 #define GEOS_INDEX_SPATIALINDEX_H
00018 
00019 #include <vector>
00020 
00021 // Forward declarations
00022 namespace geos {
00023         namespace geom {
00024                 class Envelope;
00025         }
00026         namespace index {
00027                 class ItemVisitor;
00028         }
00029 }
00030 
00031 namespace geos {
00032 namespace index {
00033 
00046 class SpatialIndex {
00047 public:
00048         virtual ~SpatialIndex() {};
00049 
00054         virtual void insert(const geom::Envelope *itemEnv, void *item)=0;
00055 
00065         //virtual std::vector<void*>* query(const geom::Envelope *searchEnv)=0;
00066         virtual void query(const geom::Envelope* searchEnv, std::vector<void*>&)=0;
00067 
00078         virtual void query(const geom::Envelope *searchEnv, ItemVisitor& visitor)=0;
00079 
00087         virtual bool remove(const geom::Envelope* itemEnv, void* item)=0;
00088 
00089 
00090 };
00091 
00092 
00093 } // namespace geos.index
00094 } // namespace geos
00095 
00096 #endif // GEOS_INDEX_SPATIALINDEX_H
00097 

Generated on Fri Mar 27 04:53:02 2009 for GEOS by  doxygen 1.5.4