GEOS 3.6.2
SimpleNestedRingTester.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/SimpleNestedRingTester.java rev. 1.14 (JTS-1.10)
17 *
18 **********************************************************************/
19
20#ifndef GEOS_OP_SIMPLENESTEDRINGTESTER_H
21#define GEOS_OP_SIMPLENESTEDRINGTESTER_H
22
23#include <geos/export.h>
24
25#include <cstddef>
26#include <vector>
27
28#ifdef _MSC_VER
29#pragma warning(push)
30#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
31#endif
32
33// Forward declarations
34namespace geos {
35 namespace geom {
36 class Coordinate;
37 class LinearRing;
38 }
39 namespace geomgraph {
40 class GeometryGraph;
41 }
42}
43
44namespace geos {
45namespace operation { // geos::operation
46namespace valid { // geos::operation::valid
47
54class GEOS_DLL SimpleNestedRingTester {
55private:
56 geomgraph::GeometryGraph *graph; // used to find non-node vertices
57 std::vector<geom::LinearRing*> rings;
58 geom::Coordinate *nestedPt;
59public:
60 SimpleNestedRingTester(geomgraph::GeometryGraph *newGraph)
61 :
62 graph(newGraph),
63 rings(),
64 nestedPt(NULL)
65 {}
66
67 ~SimpleNestedRingTester() {
68 }
69
70 void add(geom::LinearRing *ring) {
71 rings.push_back(ring);
72 }
73
74 /*
75 * Be aware that the returned Coordinate (if != NULL)
76 * will point to storage owned by one of the LinearRing
77 * previously added. If you destroy them, this
78 * will point to an invalid memory address.
79 */
80 geom::Coordinate *getNestedPoint() {
81 return nestedPt;
82 }
83
84 bool isNonNested();
85};
86
87} // namespace geos.operation.valid
88} // namespace geos.operation
89} // namespace geos
90
91#ifdef _MSC_VER
92#pragma warning(pop)
93#endif
94
95#endif // GEOS_OP_SIMPLENESTEDRINGTESTER_H
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Models an OGC SFS LinearRing.
Definition LinearRing.h:57
Definition GeometryGraph.h:74
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Contains classes that implement topology graphs.
Definition IndexedNestedRingTester.h:34
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