00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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>
00024
00025
00026
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 {
00040 namespace prep {
00041
00065 class AbstractPreparedPolygonContains : public PreparedPolygonPredicate
00066 {
00067 private:
00068
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 }
00134 }
00135 }
00136
00137 #endif // GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
00138
00139
00140
00141