21 #ifndef GEOS_OP_ISVALIDOP_H
22 #define GEOS_OP_ISVALIDOP_H
24 #include <geos/export.h>
26 #include <geos/operation/valid/TopologyValidationError.h>
31 class TopologyValidationError;
34 class CoordinateSequence;
35 class GeometryFactory;
41 class GeometryCollection;
43 class MultiLineString;
47 class EdgeIntersectionList;
61 class GEOS_DLL IsValidOp {
65 const geom::Geometry* parentGeometry;
70 TopologyValidationError* validErr;
75 void checkValid(
const geom::Geometry* g);
76 void checkValid(
const geom::Point* g);
77 void checkValid(
const geom::LinearRing* g);
78 void checkValid(
const geom::LineString* g);
79 void checkValid(
const geom::Polygon* g);
80 void checkValid(
const geom::MultiPolygon* g);
81 void checkValid(
const geom::GeometryCollection* gc);
82 void checkConsistentArea(geomgraph::GeometryGraph* graph);
93 void checkNoSelfIntersectingRings(geomgraph::GeometryGraph* graph);
101 void checkNoSelfIntersectingRing(
102 geomgraph::EdgeIntersectionList& eiList);
104 void checkTooFewPoints(geomgraph::GeometryGraph* graph);
117 void checkHolesInShell(
const geom::Polygon* p,
118 geomgraph::GeometryGraph* graph);
132 void checkHolesNotNested(
const geom::Polygon* p,
133 geomgraph::GeometryGraph* graph);
149 void checkShellsNotNested(
const geom::MultiPolygon* mp,
150 geomgraph::GeometryGraph* graph);
163 void checkShellNotNested(
const geom::LinearRing* shell,
164 const geom::Polygon* p,
165 geomgraph::GeometryGraph* graph);
177 const geom::Coordinate* checkShellInsideHole(
178 const geom::LinearRing* shell,
179 const geom::LinearRing* hole,
180 geomgraph::GeometryGraph* graph);
182 void checkConnectedInteriors(geomgraph::GeometryGraph& graph);
184 void checkInvalidCoordinates(
const geom::CoordinateSequence* cs);
186 void checkInvalidCoordinates(
const geom::Polygon* poly);
188 void checkClosedRings(
const geom::Polygon* poly);
190 void checkClosedRing(
const geom::LinearRing* ring);
192 bool isSelfTouchingRingFormingHoleValid;
201 static const geom::Coordinate* findPtNotNode(
202 const geom::CoordinateSequence* testCoords,
203 const geom::LinearRing* searchRing,
204 geomgraph::GeometryGraph* graph);
214 static bool isValid(
const geom::Coordinate& coord);
222 static bool isValid(
const geom::Geometry& geom);
224 IsValidOp(
const geom::Geometry* geom)
226 parentGeometry(geom),
229 isSelfTouchingRingFormingHoleValid(false)
267 setSelfTouchingRingFormingHoleValid(
bool p_isValid)
269 isSelfTouchingRingFormingHoleValid = p_isValid;
278 #endif // GEOS_OP_ISVALIDOP_H