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

- File List

# SpatialIndex.h

    00001 /**********************************************************************
    00002  * $Id: SpatialIndex.h 2556 2009-06-06 22:22:28Z strk $
    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 <geos/export.h>
    00020
    00021 #include <vector>
    00022
    00023 // Forward declarations
    00024 namespace geos {
    00025         namespace geom {
    00026                 class Envelope;
    00027         }
    00028         namespace index {
    00029                 class ItemVisitor;
    00030         }
    00031 }
    00032
    00033 namespace geos {
    00034 namespace index {
    00035
    00048 class GEOS_DLL SpatialIndex {
    00049 public:
    00050
    00051     virtual ~SpatialIndex() {}
    00052
    00065         virtual void insert(const geom::Envelope *itemEnv, void *item) = 0;
    00066
    00076         //virtual std::vector<void*>* query(const geom::Envelope *searchEnv)=0;
    00077         virtual void query(const geom::Envelope* searchEnv, std::vector<void*>&) = 0;
    00078
    00089         virtual void query(const geom::Envelope *searchEnv, ItemVisitor& visitor) = 0;
    00090
    00098         virtual bool remove(const geom::Envelope* itemEnv, void* item) = 0;
    00099
    00100 };
    00101
    00102
    00103 } // namespace geos.index
    00104 } // namespace geos
    00105
    00106 #endif // GEOS_INDEX_SPATIALINDEX_H
    00107