00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
00023 #define GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
00024
00025 #include <geos/geom/prep/PreparedPolygonPredicate.h>
00026
00027
00028
00029 namespace geos {
00030 namespace geom {
00031 class Geometry;
00032
00033 namespace prep {
00034 class PreparedPolygon;
00035 }
00036 }
00037 }
00038
00039
00040 namespace geos {
00041 namespace geom {
00042 namespace prep {
00043
00067 class AbstractPreparedPolygonContains : public PreparedPolygonPredicate
00068 {
00069 private:
00070
00071 bool hasSegmentIntersection;
00072 bool hasProperIntersection;
00073 bool hasNonProperIntersection;
00074
00075 bool isProperIntersectionImpliesNotContainedSituation( const geom::Geometry * testGeom);
00076
00082 bool isSingleShell( const geom::Geometry & geom);
00083
00084 void findAndClassifyIntersections( const geom::Geometry * geom);
00085
00086 protected:
00093 bool requireSomePointInInterior;
00094
00102 bool eval( const geom::Geometry * geom);
00103
00111 virtual bool fullTopologicalPredicate( const geom::Geometry * geom) =0;
00112
00113 public:
00114 AbstractPreparedPolygonContains( const PreparedPolygon * const prepPoly)
00115 : PreparedPolygonPredicate( prepPoly),
00116 hasSegmentIntersection( false),
00117 hasProperIntersection( false),
00118 hasNonProperIntersection( false),
00119 requireSomePointInInterior(true)
00120 { }
00121
00122 AbstractPreparedPolygonContains( const PreparedPolygon * const prepPoly, bool requireSomePointInInterior)
00123 : PreparedPolygonPredicate( prepPoly),
00124 hasSegmentIntersection( false),
00125 hasProperIntersection( false),
00126 hasNonProperIntersection( false),
00127 requireSomePointInInterior(requireSomePointInInterior)
00128 { }
00129
00130 virtual ~AbstractPreparedPolygonContains()
00131 { }
00132
00133 };
00134
00135 }
00136 }
00137 }
00138
00139 #endif // GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
00140
00141
00142
00143