GEOS
3.3.5
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.refractions.net 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/AbstractPreparedPolygonContains.java r388 (JTS-1.12) 00017 * 00018 **********************************************************************/ 00019 00020 #ifndef GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H 00021 #define GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H 00022 00023 #include <geos/geom/prep/PreparedPolygonPredicate.h> // inherited 00024 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 00038 namespace geos { 00039 namespace geom { // geos::geom 00040 namespace prep { // geos::geom::prep 00041 00065 class AbstractPreparedPolygonContains : public PreparedPolygonPredicate 00066 { 00067 private: 00068 // information about geometric situation 00069 bool hasSegmentIntersection; 00070 bool hasProperIntersection; 00071 bool hasNonProperIntersection; 00072 00073 bool isProperIntersectionImpliesNotContainedSituation( const geom::Geometry * testGeom); 00074 00080 bool isSingleShell( const geom::Geometry & geom); 00081 00082 void findAndClassifyIntersections( const geom::Geometry * geom); 00083 00084 protected: 00091 bool requireSomePointInInterior; 00092 00100 bool eval( const geom::Geometry * geom); 00101 00109 virtual bool fullTopologicalPredicate( const geom::Geometry * geom) =0; 00110 00111 public: 00112 AbstractPreparedPolygonContains( const PreparedPolygon * const prepPoly) 00113 : PreparedPolygonPredicate( prepPoly), 00114 hasSegmentIntersection( false), 00115 hasProperIntersection( false), 00116 hasNonProperIntersection( false), 00117 requireSomePointInInterior(true) 00118 { } 00119 00120 AbstractPreparedPolygonContains( const PreparedPolygon * const prepPoly, bool requireSomePointInInterior) 00121 : PreparedPolygonPredicate( prepPoly), 00122 hasSegmentIntersection( false), 00123 hasProperIntersection( false), 00124 hasNonProperIntersection( false), 00125 requireSomePointInInterior(requireSomePointInInterior) 00126 { } 00127 00128 virtual ~AbstractPreparedPolygonContains() 00129 { } 00130 00131 }; 00132 00133 } // geos::geom::prep 00134 } // geos::geom 00135 } // geos 00136 00137 #endif // GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H 00138 /********************************************************************** 00139 * $Log$ 00140 **********************************************************************/ 00141