Key.h

00001 /**********************************************************************
00002  * $Id: Key.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_IDX_QUADTREE_KEY_H
00017 #define GEOS_IDX_QUADTREE_KEY_H
00018 
00019 // Forward declarations
00020 namespace geos {
00021         namespace geom {
00022                 class Envelope;
00023                 class Coordinate;
00024         }
00025 }
00026 
00027 namespace geos {
00028 namespace index { // geos::index
00029 namespace quadtree { // geos::index::quadtree
00030 
00038 class Key {
00039 public:
00040         static int computeQuadLevel(geom::Envelope *env);
00041         Key(geom::Envelope *itemEnv);
00042         virtual ~Key();
00043         geom::Coordinate* getPoint();
00044         int getLevel();
00045         geom::Envelope* getEnvelope();
00046         geom::Coordinate* getCentre();
00047         void computeKey(geom::Envelope *itemEnv);
00048 private:        
00049         // the fields which make up the key
00050         geom::Coordinate *pt;
00051         int level;
00052         // auxiliary data which is derived from the key for use in computation
00053         geom::Envelope *env;
00054         void computeKey(int level,geom::Envelope *itemEnv);
00055 };
00056 
00057 } // namespace geos::index::quadtree
00058 } // namespace geos::index
00059 } // namespace geos
00060 
00061 #endif // GEOS_IDX_QUADTREE_KEY_H
00062 
00063 /**********************************************************************
00064  * $Log$
00065  * Revision 1.1  2006/03/22 12:22:50  strk
00066  * indexQuadtree.h split
00067  *
00068  **********************************************************************/
00069 

Generated on Fri Mar 27 04:52:48 2009 for GEOS by  doxygen 1.5.4