GEOS 3.4.2

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

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
27 namespace geos {
28 namespace geom {
29 class Geometry;
30
31 namespace prep {
32 class PreparedPolygon;
33 }
34 }
35 }
36
37 namespace geos {
38 namespace geom { // geos::geom
39 namespace prep { // geos::geom::prep
40
55 class PreparedPolygonCovers : public AbstractPreparedPolygonContains
56 {
57 private:
58 protected:
66 bool fullTopologicalPredicate( const geom::Geometry * geom);
67
68 public:
77 static bool covers(const PreparedPolygon * const prep, const geom::Geometry * geom)
78 {
79 PreparedPolygonCovers polyInt(prep);
80 return polyInt.covers(geom);
81 }
82
88 PreparedPolygonCovers(const PreparedPolygon * const prep)
89 : AbstractPreparedPolygonContains( prep, false)
90 { }
91
98 bool covers( const Geometry * geom)
99 {
100 return eval( geom);
101 }
102
103 };
104
105 } // geos::geom::prep
106 } // geos::geom
107 } // geos
108
109 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H