GEOS 3.11.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#pragma once
22
23#include <geos/geom/prep/AbstractPreparedPolygonContains.h> // inherited
24
25// forward declarations
26namespace geos {
27namespace geom {
28class Geometry;
29
30namespace prep {
31class PreparedPolygon;
32}
33}
34}
35
36namespace geos {
37namespace geom { // geos::geom
38namespace prep { // geos::geom::prep
39
55private:
56protected:
64 bool fullTopologicalPredicate(const geom::Geometry* geom) override;
65
66public:
75 static bool
76 covers(const PreparedPolygon* const prep, const geom::Geometry* geom)
77 {
78 PreparedPolygonCovers polyInt(prep);
79 return polyInt.covers(geom);
80 }
81
89 { }
90
97 bool
98 covers(const Geometry* geom)
99 {
100 return eval(geom);
101 }
102
103};
104
105} // geos::geom::prep
106} // geos::geom
107} // geos
108
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
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)
Computes the covers spatial relationship predicate for a PreparedPolygon relative to all other Geomet...
Definition: PreparedPolygonCovers.h:54
static bool covers(const PreparedPolygon *const prep, const geom::Geometry *geom)
Computes the covers predicate between a PreparedPolygon and a Geometry.
Definition: PreparedPolygonCovers.h:76
bool fullTopologicalPredicate(const geom::Geometry *geom) override
bool covers(const Geometry *geom)
Tests whether this PreparedPolygon covers a given geometry.
Definition: PreparedPolygonCovers.h:98
PreparedPolygonCovers(const PreparedPolygon *const prep)
Creates an instance of this operation.
Definition: PreparedPolygonCovers.h:87
A prepared version of Polygon or MultiPolygon geometries.
Definition: PreparedPolygon.h:51
Basic namespace for all GEOS functionalities.
Definition: geos.h:39