GEOS  3.14.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 #pragma once
21 
22 #include <geos/export.h>
23 
24 #include <geos/geom/Coordinate.h> // for composition
25 #include <geos/algorithm/LineIntersector.h> // for composition
26 #include <geos/operation/relate/RelateNodeGraph.h> // for composition
27 
28 // Forward declarations
29 namespace geos {
30 namespace algorithm {
31 class LineIntersector;
32 }
33 namespace geomgraph {
34 class GeometryGraph;
35 }
36 namespace operation {
37 namespace relate {
38 class RelateNodeGraph;
39 }
40 }
41 }
42 
43 namespace geos {
44 namespace operation { // geos::operation
45 namespace valid { // geos::operation::valid
46 
68 class GEOS_DLL ConsistentAreaTester {
69 private:
70 
72 
74  geomgraph::GeometryGraph* geomGraph;
75 
76  relate::RelateNodeGraph nodeGraph;
77 
79  geom::Coordinate invalidPoint;
80 
85  bool isNodeEdgeAreaLabelsConsistent();
86 
87 public:
88 
96 
97  ~ConsistentAreaTester() = default;
98 
104 
113 
130 };
131 
132 
133 
134 } // namespace geos::operation::valid
135 } // namespace geos::operation
136 } // namespace geos
137 
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:53
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
A GeometryGraph is a graph that models a given Geometry.
Definition: GeometryGraph.h:71
Implements the simple graph of Nodes and geomgraph::EdgeEnd which is all that is required to determin...
Definition: RelateNodeGraph.h:67
Checks that a geomgraph::GeometryGraph representing an area (a geom::Polygon or geom::MultiPolygon) h...
Definition: ConsistentAreaTester.h:68
bool isNodeConsistentArea()
Check all nodes to see if their labels are consistent with area topology.
ConsistentAreaTester(geomgraph::GeometryGraph *newGeomGraph)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25