GEOS 3.6.2
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
35namespace 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
50namespace geos {
51namespace operation { // geos::operation
52namespace valid { // geos::operation::valid
53
61public:
62
65
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
80private:
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
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
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:53
Models an OGC SFS LinearRing.
Definition LinearRing.h:57
Definition GeometryGraph.h:74
A Quadtree is a spatial index structure for efficient querying of 2D rectangles. If other kinds of sp...
Definition Quadtree.h:72
QuadtreeNestedRingTester(geomgraph::GeometryGraph *newGraph)
Caller retains ownership of GeometryGraph.
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Contains classes that implement topology graphs.
Definition IndexedNestedRingTester.h:34
Contains classes that implement a Quadtree spatial index.
Definition DoubleBits.h:29
Provides classes for various kinds of spatial indexes.
Definition IndexedNestedRingTester.h:31
Provides classes for testing the validity of geometries.
Definition IndexedNestedRingTester.h:41
Provides classes for implementing operations on geometries.
Definition IndexedNestedRingTester.h:40
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25