GEOS  3.3.3
AbstractPreparedPolygonContains.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.refractions.net
5  *
6  * Copyright (C) 2006 Refractions Research Inc.
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU Lesser General Public Licence as published
10  * by the Free Software Foundation.
11  * See the COPYING file for more information.
12  *
13  *
14  **********************************************************************
15  *
16  * Last port: geom/prep/AbstractPreparedPolygonContains.java r388 (JTS-1.12)
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
21 #define GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
22 
23 #include <geos/geom/prep/PreparedPolygonPredicate.h> // inherited
24 
25 
26 // forward declarations
27 namespace geos {
28  namespace geom {
29  class Geometry;
30 
31  namespace prep {
32  class PreparedPolygon;
33  }
34  }
35 }
36 
37 
38 namespace geos {
39 namespace geom { // geos::geom
40 namespace prep { // geos::geom::prep
41 
66 {
67 private:
68  // information about geometric situation
69  bool hasSegmentIntersection;
70  bool hasProperIntersection;
71  bool hasNonProperIntersection;
72 
73  bool isProperIntersectionImpliesNotContainedSituation( const geom::Geometry * testGeom);
74 
80  bool isSingleShell( const geom::Geometry & geom);
81 
82  void findAndClassifyIntersections( const geom::Geometry * geom);
83 
84 protected:
92 
100  bool eval( const geom::Geometry * geom);
101 
109  virtual bool fullTopologicalPredicate( const geom::Geometry * geom) =0;
110 
111 public:
112  AbstractPreparedPolygonContains( const PreparedPolygon * const prepPoly)
113  : PreparedPolygonPredicate( prepPoly),
114  hasSegmentIntersection( false),
115  hasProperIntersection( false),
116  hasNonProperIntersection( false),
118  { }
119 
121  : PreparedPolygonPredicate( prepPoly),
122  hasSegmentIntersection( false),
123  hasProperIntersection( false),
124  hasNonProperIntersection( false),
125  requireSomePointInInterior(requireSomePointInInterior)
126  { }
127 
128  virtual ~AbstractPreparedPolygonContains()
129  { }
130 
131 };
132 
133 } // geos::geom::prep
134 } // geos::geom
135 } // geos
136 
137 #endif // GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
138 /**********************************************************************
139  * $Log$
140  **********************************************************************/
141