GEOS 3.3.8

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

- File List

QuadtreeNestedRingTester.h
1 /**********************************************************************
2 * $Id: QuadtreeNestedRingTester.h 3255 2011-03-01 17:56:10Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: operation/valid/QuadtreeNestedRingTester.java rev. 1.12 (JTS-1.10)
18 *
19 **********************************************************************/
20
21 #ifndef GEOS_OP_QUADTREENESTEDRINGTESTER_H
22 #define GEOS_OP_QUADTREENESTEDRINGTESTER_H
23
24 #include <geos/export.h>
25
26 #include <geos/geom/Envelope.h> // for composition
27
28 #include <vector>
29
30 #ifdef _MSC_VER
31 #pragma warning(push)
32 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
33 #endif
34
35 // Forward declarations
36 namespace geos {
37 namespace geom {
38 class LinearRing;
39 class Coordinate;
40 }
41 namespace index {
42 namespace quadtree {
43 class Quadtree;
44 }
45 }
46 namespace geomgraph {
47 class GeometryGraph;
48 }
49 }
50
51 namespace geos {
52 namespace operation { // geos::operation
53 namespace valid { // geos::operation::valid
54
61 class GEOS_DLL QuadtreeNestedRingTester {
62 public:
63
65 QuadtreeNestedRingTester(geomgraph::GeometryGraph* newGraph);
66
67 ~QuadtreeNestedRingTester();
68
69 /*
70 * Be aware that the returned Coordinate (if != NULL)
71 * will point to storage owned by one of the LinearRing
72 * previously added. If you destroy them, this
73 * will point to an invalid memory address.
74 */
75 geom::Coordinate* getNestedPoint();
76
77 void add(const geom::LinearRing* ring);
78
79 bool isNonNested();
80
81 private:
82
83 geomgraph::GeometryGraph* graph; // used to find non-node vertices
84
85 std::vector<const geom::LinearRing*> rings;
86
87 geom::Envelope totalEnv;
88
89 index::quadtree::Quadtree* qt;
90
91 geom::Coordinate* nestedPt;
92
93 void buildQuadtree();
94 };
95
96 } // namespace geos::operation::valid
97 } // namespace geos::operation
98 } // namespace geos
99
100 #ifdef _MSC_VER
101 #pragma warning(pop)
102 #endif
103
104 #endif // GEOS_OP_QUADTREENESTEDRINGTESTER_H
105
106 /**********************************************************************
107 * $Log$
108 * Revision 1.2 2006/03/29 11:48:53 strk
109 * Removed useless heap allocations in construction, enforced const correctness
110 *
111 * Revision 1.1 2006/03/20 16:57:44 strk
112 * spatialindex.h and opValid.h headers split
113 *
114 **********************************************************************/
115