00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_NODING_NODINGVALIDATOR_H
00017 #define GEOS_NODING_NODINGVALIDATOR_H
00018
00019 #include <geos/export.h>
00020
00021 #include <vector>
00022 #include <iostream>
00023
00024 #include <geos/inline.h>
00025
00026 #include <geos/algorithm/LineIntersector.h>
00027
00028
00029
00030 namespace geos {
00031 namespace geom {
00032 class Coordinate;
00033 }
00034 namespace noding {
00035 class SegmentString;
00036 }
00037 }
00038
00039 namespace geos {
00040 namespace noding {
00041
00049 class GEOS_DLL NodingValidator {
00050 private:
00051 algorithm::LineIntersector li;
00052 const std::vector<SegmentString*>& segStrings;
00053
00058 void checkCollapses() const;
00059
00060 void checkCollapses(const SegmentString& ss) const;
00061
00062 void checkCollapse(const geom::Coordinate& p0, const geom::Coordinate& p1,
00063 const geom::Coordinate& p2) const;
00064
00069 void checkInteriorIntersections();
00070
00071 void checkInteriorIntersections(const SegmentString& ss0,
00072 const SegmentString& ss1);
00073
00074 void checkInteriorIntersections(
00075 const SegmentString& e0, unsigned int segIndex0,
00076 const SegmentString& e1, unsigned int segIndex1);
00077
00082 void checkEndPtVertexIntersections() const;
00083
00084 void checkEndPtVertexIntersections(const geom::Coordinate& testPt,
00085 const std::vector<SegmentString*>& segStrings) const;
00086
00091 bool hasInteriorIntersection(const algorithm::LineIntersector& aLi,
00092 const geom::Coordinate& p0, const geom::Coordinate& p1) const;
00093
00094 public:
00095
00096 NodingValidator(const std::vector<SegmentString*>& newSegStrings):
00097 segStrings(newSegStrings)
00098 {}
00099
00100 ~NodingValidator() {}
00101
00102 void checkValid();
00103
00104 };
00105
00106
00107 }
00108 }
00109
00110
00111
00112
00113
00114 #endif // GEOS_NODING_NODINGVALIDATOR_H
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125