GEOS  3.8.0dev
ConsistentAreaTester.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/ConsistentAreaTester.java rev. 1.14 (JTS-1.10)
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_OP_CONSISTENTAREATESTER_H
21 #define GEOS_OP_CONSISTENTAREATESTER_H
22 
23 #include <geos/export.h>
24 
25 #include <geos/geom/Coordinate.h> // for composition
26 #include <geos/algorithm/LineIntersector.h> // for composition
27 #include <geos/operation/relate/RelateNodeGraph.h> // for composition
28 
29 // Forward declarations
30 namespace geos {
31 namespace algorithm {
32 class LineIntersector;
33 }
34 namespace geomgraph {
35 class GeometryGraph;
36 }
37 namespace operation {
38 namespace relate {
39 class RelateNodeGraph;
40 }
41 }
42 }
43 
44 namespace geos {
45 namespace operation { // geos::operation
46 namespace valid { // geos::operation::valid
47 
69 class GEOS_DLL ConsistentAreaTester {
70 private:
71 
73 
75  geomgraph::GeometryGraph* geomGraph;
76 
77  relate::RelateNodeGraph nodeGraph;
78 
80  geom::Coordinate invalidPoint;
81 
86  bool isNodeEdgeAreaLabelsConsistent();
87 
88 public:
89 
97 
99 
104  geom::Coordinate& getInvalidPoint();
105 
113  bool isNodeConsistentArea();
114 
130  bool hasDuplicateRings();
131 };
132 
133 
134 
135 } // namespace geos::operation::valid
136 } // namespace geos::operation
137 } // namespace geos
138 
139 #endif // GEOS_OP_CONSISTENTAREATESTER_H
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
A GeometryGraph is a graph that models a given Geometry.
Definition: GeometryGraph.h:73
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:49
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
Implements the simple graph of Nodes and geomgraph::EdgeEnd which is all that is required to determin...
Definition: RelateNodeGraph.h:68
Checks that a geomgraph::GeometryGraph representing an area (a geom::Polygon or geom::MultiPolygon) h...
Definition: ConsistentAreaTester.h:69