GEOS: PreparedPolygonContains.h Source File

GEOS 3.3.8

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

- File List

PreparedPolygonContains.h
1 /**********************************************************************
2 * $Id: PreparedPolygonContains.h 2418 2009-04-29 08:15:21Z strk $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 *
15 **********************************************************************
16 *
17 * Last port: geom/prep/PreparedPolygonContains.java rev 1.5 (JTS-1.10)
18 *
19 **********************************************************************/
20
21 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H
22 #define GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_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 PreparedPolygonContains : public AbstractPreparedPolygonContains
56 {
57 public:
58
64 PreparedPolygonContains(const PreparedPolygon * const prepPoly);
65
72 bool contains(const geom::Geometry * geom)
73 {
74 return eval(geom);
75 }
76
85 static bool contains(const PreparedPolygon * const prep, const geom::Geometry * geom)
86 {
87 PreparedPolygonContains polyInt(prep);
88 return polyInt.contains(geom);
89 }
90
91 protected:
99 bool fullTopologicalPredicate(const geom::Geometry * geom);
100
101 };
102
103 } // geos::geom::prep
104 } // geos::geom
105 } // geos
106
107 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H
108 /**********************************************************************
109 * $Log$
110 **********************************************************************/
111