GEOS 3.9.1
PreparedPolygonCovers.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/PreparedPolygonCovers.java rev 1.2 (JTS-1.10)
17 * (2007-12-12)
18 *
19 **********************************************************************/
20
21#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H
22#define GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H
23
24#include <geos/geom/prep/AbstractPreparedPolygonContains.h> // inherited
25
26// forward declarations
27namespace geos {
28namespace geom {
29class Geometry;
30
31namespace prep {
32class PreparedPolygon;
33}
34}
35}
36
37namespace geos {
38namespace geom { // geos::geom
39namespace prep { // geos::geom::prep
40
56private:
57protected:
65 bool fullTopologicalPredicate(const geom::Geometry* geom) override;
66
67public:
76 static bool
77 covers(const PreparedPolygon* const prep, const geom::Geometry* geom)
78 {
79 PreparedPolygonCovers polyInt(prep);
80 return polyInt.covers(geom);
81 }
82
90 { }
91
98 bool
99 covers(const Geometry* geom)
100 {
101 return eval(geom);
102 }
103
104};
105
106} // geos::geom::prep
107} // geos::geom
108} // geos
109
110#endif // GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_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)
Computes the covers spatial relationship predicate for a PreparedPolygon relative to all other Geomet...
Definition PreparedPolygonCovers.h:55
static bool covers(const PreparedPolygon *const prep, const geom::Geometry *geom)
Computes the covers predicate between a PreparedPolygon and a Geometry.
Definition PreparedPolygonCovers.h:77
bool fullTopologicalPredicate(const geom::Geometry *geom) override
bool covers(const Geometry *geom)
Tests whether this PreparedPolygon covers a given geometry.
Definition PreparedPolygonCovers.h:99
PreparedPolygonCovers(const PreparedPolygon *const prep)
Creates an instance of this operation.
Definition PreparedPolygonCovers.h:88
A prepared version of Polygon or MultiPolygon geometries.
Definition PreparedPolygon.h:52
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26