GEOS: QuadtreeNestedRingTester.h Source File

GEOS 3.5.0

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

- File List

QuadtreeNestedRingTester.h
1 /**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2005-2006 Refractions Research Inc.
7 * Copyright (C) 2001-2002 Vivid Solutions 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 * Last port: operation/valid/QuadtreeNestedRingTester.java rev. 1.12 (JTS-1.10)
17 *
18 **********************************************************************/
19
20 #ifndef GEOS_OP_QUADTREENESTEDRINGTESTER_H
21 #define GEOS_OP_QUADTREENESTEDRINGTESTER_H
22
23 #include <geos/export.h>
24
25 #include <geos/geom/Envelope.h> // for composition
26
27 #include <vector>
28
29 #ifdef _MSC_VER
30 #pragma warning(push)
31 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
32 #endif
33
34 // Forward declarations
35 namespace geos {
36 namespace geom {
37 class LinearRing;
38 class Coordinate;
39 }
40 namespace index {
41 namespace quadtree {
42 class Quadtree;
43 }
44 }
45 namespace geomgraph {
46 class GeometryGraph;
47 }
48 }
49
50 namespace geos {
51 namespace operation { // geos::operation
52 namespace valid { // geos::operation::valid
53
60 class GEOS_DLL QuadtreeNestedRingTester {
61 public:
62
64 QuadtreeNestedRingTester(geomgraph::GeometryGraph* newGraph);
65
66 ~QuadtreeNestedRingTester();
67
68 /*
69 * Be aware that the returned Coordinate (if != NULL)
70 * will point to storage owned by one of the LinearRing
71 * previously added. If you destroy them, this
72 * will point to an invalid memory address.
73 */
74 geom::Coordinate* getNestedPoint();
75
76 void add(const geom::LinearRing* ring);
77
78 bool isNonNested();
79
80 private:
81
82 geomgraph::GeometryGraph* graph; // used to find non-node vertices
83
84 std::vector<const geom::LinearRing*> rings;
85
86 geom::Envelope totalEnv;
87
88 index::quadtree::Quadtree* qt;
89
90 geom::Coordinate* nestedPt;
91
92 void buildQuadtree();
93 };
94
95 } // namespace geos::operation::valid
96 } // namespace geos::operation
97 } // namespace geos
98
99 #ifdef _MSC_VER
100 #pragma warning(pop)
101 #endif
102
103 #endif // GEOS_OP_QUADTREENESTEDRINGTESTER_H
geos::geom::Envelope
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:53
geos::index::quadtree::Quadtree
A Quadtree is a spatial index structure for efficient querying of 2D rectangles. If other kinds of sp...
Definition: Quadtree.h:72
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
geos::geomgraph::GeometryGraph
Definition: GeometryGraph.h:73
geos::operation::valid::QuadtreeNestedRingTester
Tests whether any of a set of LinearRings are nested inside another ring in the set, using a Quadtree index to speed up the comparisons.
Definition: QuadtreeNestedRingTester.h:60
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
geos::geom::LinearRing
Models an OGC SFS LinearRing.
Definition: LinearRing.h:57