00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
00018 #define GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
00019
00020 #include <geos/geom/prep/PreparedPolygonPredicate.h>
00021
00022
00023
00024 namespace geos {
00025 namespace geom {
00026 class Geometry;
00027
00028 namespace prep {
00029 class PreparedPolygon;
00030 }
00031 }
00032 }
00033
00034
00035 namespace geos {
00036 namespace geom {
00037 namespace prep {
00038
00061 class AbstractPreparedPolygonContains : public PreparedPolygonPredicate
00062 {
00063 private:
00064
00065 bool hasSegmentIntersection;
00066 bool hasProperIntersection;
00067 bool hasNonProperIntersection;
00068
00069 bool isProperIntersectionImpliesNotContainedSituation( const geom::Geometry * testGeom);
00070
00076 bool isSingleShell( const geom::Geometry & geom);
00077
00078 void findAndClassifyIntersections( const geom::Geometry * geom);
00079
00080 protected:
00087 bool requireSomePointInInterior;
00088
00096 bool eval( const geom::Geometry * geom);
00097
00105 virtual bool fullTopologicalPredicate( const geom::Geometry * geom) =0;
00106
00107 public:
00108 AbstractPreparedPolygonContains( const PreparedPolygon * const prepPoly)
00109 : PreparedPolygonPredicate( prepPoly),
00110 hasSegmentIntersection( false),
00111 hasProperIntersection( false),
00112 hasNonProperIntersection( false),
00113 requireSomePointInInterior(true)
00114 { }
00115
00116 AbstractPreparedPolygonContains( const PreparedPolygon * const prepPoly, bool requireSomePointInInterior)
00117 : PreparedPolygonPredicate( prepPoly),
00118 hasSegmentIntersection( false),
00119 hasProperIntersection( false),
00120 hasNonProperIntersection( false),
00121 requireSomePointInInterior(requireSomePointInInterior)
00122 { }
00123
00124 virtual ~AbstractPreparedPolygonContains()
00125 { }
00126
00127 };
00128
00129 }
00130 }
00131 }
00132
00133 #endif // GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
00134
00135
00136
00137