GEOS 3.14.0dev
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#pragma once
21
22#include <geos/geom/prep/PreparedPolygonPredicate.h> // inherited
23
24
25// forward declarations
26namespace geos {
27namespace geom {
28class Geometry;
29
30namespace prep {
31class PreparedPolygon;
32}
33}
34}
35
36
37namespace geos {
38namespace geom { // geos::geom
39namespace prep { // geos::geom::prep
40
65private:
66 // information about geometric situation
67 bool hasSegmentIntersection;
68 bool hasProperIntersection;
69 bool hasNonProperIntersection;
70
71 bool isProperIntersectionImpliesNotContainedSituation(const geom::Geometry* testGeom);
72
78 bool isSingleShell(const geom::Geometry& geom);
79
80 void findAndClassifyIntersections(const geom::Geometry* geom);
81
82protected:
90
98 bool eval(const geom::Geometry* geom);
99
108 bool evalPointTestGeom(const geom::Geometry* geom, geom::Location outermostLoc);
109
117 virtual bool fullTopologicalPredicate(const geom::Geometry* geom) = 0;
118
119public:
120 AbstractPreparedPolygonContains(const PreparedPolygon* const p_prepPoly)
121 : PreparedPolygonPredicate(p_prepPoly),
122 hasSegmentIntersection(false),
123 hasProperIntersection(false),
124 hasNonProperIntersection(false),
126 { }
127
128 AbstractPreparedPolygonContains(const PreparedPolygon* const p_prepPoly, bool p_requireSomePointInInterior)
129 : PreparedPolygonPredicate(p_prepPoly),
130 hasSegmentIntersection(false),
131 hasProperIntersection(false),
132 hasNonProperIntersection(false),
133 requireSomePointInInterior(p_requireSomePointInInterior)
134 { }
135
136 ~AbstractPreparedPolygonContains() override
137 { }
138
139};
140
141} // geos::geom::prep
142} // geos::geom
143} // geos
144
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:197
A base class containing the logic for computes the contains and covers spatial relationship predicate...
Definition AbstractPreparedPolygonContains.h:64
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:89
A base class for predicate operations on PreparedPolygons.
Definition PreparedPolygonPredicate.h:57
A prepared version of Polygon or MultiPolygon geometries.
Definition PreparedPolygon.h:51
Location
Constants representing the location of a point relative to a geometry.
Definition Location.h:32
Basic namespace for all GEOS functionalities.
Definition geos.h:39