GEOS 3.6.2
AbstractPreparedPolygonContains.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
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
27namespace geos {
28 namespace geom {
29 class Geometry;
30
31 namespace prep {
32 class PreparedPolygon;
33 }
34 }
35}
36
37
38namespace geos {
39namespace geom { // geos::geom
40namespace prep { // geos::geom::prep
41
65class AbstractPreparedPolygonContains : public PreparedPolygonPredicate
66{
67private:
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
84protected:
92
100 bool eval( const geom::Geometry * geom);
101
110
111public:
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),
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
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:167
A base class containing the logic for computes the contains and covers spatial relationship predicate...
Definition AbstractPreparedPolygonContains.h:66
bool eval(const geom::Geometry *geom)
virtual bool fullTopologicalPredicate(const geom::Geometry *geom)=0
bool requireSomePointInInterior
Definition AbstractPreparedPolygonContains.h:91
A base class for predicate operations on PreparedPolygons.
Definition PreparedPolygonPredicate.h:58
A prepared version of Polygon or MultiPolygon geometries.
Definition PreparedPolygon.h:49
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25