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 * 00016 * Last port: geom/prep/PreparedPolygonCovers.java rev 1.2 (JTS-1.10) 00017 * (2007-12-12) 00018 * 00019 **********************************************************************/ 00020 00021 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H 00022 #define GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H 00023 00024 #include <geos/geom/prep/AbstractPreparedPolygonContains.h> // inherited 00025 00026 // forward declarations 00027 namespace geos { 00028 namespace geom { 00029 class Geometry; 00030 00031 namespace prep { 00032 class PreparedPolygon; 00033 } 00034 } 00035 } 00036 00037 namespace geos { 00038 namespace geom { // geos::geom 00039 namespace prep { // geos::geom::prep 00040 00055 class PreparedPolygonCovers : public AbstractPreparedPolygonContains 00056 { 00057 private: 00058 protected: 00066 bool fullTopologicalPredicate( const geom::Geometry * geom); 00067 00068 public: 00077 static bool covers(const PreparedPolygon * const prep, const geom::Geometry * geom) 00078 { 00079 PreparedPolygonCovers polyInt(prep); 00080 return polyInt.covers(geom); 00081 } 00082 00088 PreparedPolygonCovers(const PreparedPolygon * const prep) 00089 : AbstractPreparedPolygonContains( prep, false) 00090 { } 00091 00098 bool covers( const Geometry * geom) 00099 { 00100 return eval( geom); 00101 } 00102 00103 }; 00104 00105 } // geos::geom::prep 00106 } // geos::geom 00107 } // geos 00108 00109 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H