GEOS 3.9.1
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 {
36namespace geom {
37class LinearRing;
38class Coordinate;
39}
40namespace index {
41namespace quadtree {
42class Quadtree;
43}
44}
45namespace geomgraph {
46class 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:58
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition LinearRing.h:54
A GeometryGraph is a graph that models a given Geometry.
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:71
Tests whether any of a set of LinearRings are nested inside another ring in the set,...
Definition QuadtreeNestedRingTester.h:60
QuadtreeNestedRingTester(geomgraph::GeometryGraph *newGraph)
Caller retains ownership of GeometryGraph.
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26