GEOS 3.9.1
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 {
28namespace geom {
29class Geometry;
30
31namespace prep {
32class PreparedPolygon;
33}
34}
35}
36
37
38namespace geos {
39namespace geom { // geos::geom
40namespace prep { // geos::geom::prep
41
66private:
67 // information about geometric situation
68 bool hasSegmentIntersection;
69 bool hasProperIntersection;
70 bool hasNonProperIntersection;
71
72 bool isProperIntersectionImpliesNotContainedSituation(const geom::Geometry* testGeom);
73
79 bool isSingleShell(const geom::Geometry& geom);
80
81 void findAndClassifyIntersections(const geom::Geometry* geom);
82
83protected:
91
99 bool eval(const geom::Geometry* geom);
100
109 bool evalPointTestGeom(const geom::Geometry* geom, geom::Location outermostLoc);
110
118 virtual bool fullTopologicalPredicate(const geom::Geometry* geom) = 0;
119
120public:
121 AbstractPreparedPolygonContains(const PreparedPolygon* const p_prepPoly)
122 : PreparedPolygonPredicate(p_prepPoly),
123 hasSegmentIntersection(false),
124 hasProperIntersection(false),
125 hasNonProperIntersection(false),
127 { }
128
129 AbstractPreparedPolygonContains(const PreparedPolygon* const p_prepPoly, bool p_requireSomePointInInterior)
130 : PreparedPolygonPredicate(p_prepPoly),
131 hasSegmentIntersection(false),
132 hasProperIntersection(false),
133 hasNonProperIntersection(false),
134 requireSomePointInInterior(p_requireSomePointInInterior)
135 { }
136
137 ~AbstractPreparedPolygonContains() override
138 { }
139
140};
141
142} // geos::geom::prep
143} // geos::geom
144} // geos
145
146#endif // GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
A base class containing the logic for computes the contains and covers spatial relationship predicate...
Definition: AbstractPreparedPolygonContains.h:65
bool eval(const geom::Geometry *geom)
bool evalPointTestGeom(const geom::Geometry *geom, geom::Location outermostLoc)
virtual bool fullTopologicalPredicate(const geom::Geometry *geom)=0
bool requireSomePointInInterior
Definition: AbstractPreparedPolygonContains.h:90
A base class for predicate operations on PreparedPolygons.
Definition: PreparedPolygonPredicate.h:58
A prepared version of Polygon or MultiPolygon geometries.
Definition: PreparedPolygon.h:52
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:34
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26