GEOS 3.2.2
|
00001 /********************************************************************** 00002 * $Id: PreparedPolygonCovers.h 2420 2009-04-29 08:56:14Z 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 * 00017 * Last port: geom/prep/PreparedPolygonCovers.java rev 1.2 (JTS-1.10) 00018 * (2007-12-12) 00019 * 00020 **********************************************************************/ 00021 00022 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H 00023 #define GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H 00024 00025 #include <geos/geom/prep/AbstractPreparedPolygonContains.h> // inherited 00026 00027 // forward declarations 00028 namespace geos { 00029 namespace geom { 00030 class Geometry; 00031 00032 namespace prep { 00033 class PreparedPolygon; 00034 } 00035 } 00036 } 00037 00038 namespace geos { 00039 namespace geom { // geos::geom 00040 namespace prep { // geos::geom::prep 00041 00056 class PreparedPolygonCovers : public AbstractPreparedPolygonContains 00057 { 00058 private: 00059 protected: 00067 bool fullTopologicalPredicate( const geom::Geometry * geom); 00068 00069 public: 00078 static bool covers(const PreparedPolygon * const prep, const geom::Geometry * geom) 00079 { 00080 PreparedPolygonCovers polyInt(prep); 00081 return polyInt.covers(geom); 00082 } 00083 00089 PreparedPolygonCovers(const PreparedPolygon * const prep) 00090 : AbstractPreparedPolygonContains( prep, false) 00091 { } 00092 00099 bool covers( const Geometry * geom) 00100 { 00101 return eval( geom); 00102 } 00103 00104 }; 00105 00106 } // geos::geom::prep 00107 } // geos::geom 00108 } // geos 00109 00110 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H 00111 /********************************************************************** 00112 * $Log$ 00113 **********************************************************************/ 00114