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 <vector>
00020 #include <iostream>
00021
00022 #include <geos/inline.h>
00023
00024 #include <geos/algorithm/LineIntersector.h>
00025
00026
00027
00028 namespace geos {
00029 namespace geom {
00030 class Coordinate;
00031 }
00032 namespace noding {
00033 class SegmentString;
00034 }
00035 }
00036
00037 namespace geos {
00038 namespace noding {
00039
00047 class NodingValidator {
00048 private:
00049 algorithm::LineIntersector li;
00050 const std::vector<SegmentString*>& segStrings;
00051
00056 void checkCollapses() const;
00057
00058 void checkCollapses(const SegmentString& ss) const;
00059
00060 void checkCollapse(const geom::Coordinate& p0, const geom::Coordinate& p1,
00061 const geom::Coordinate& p2) const;
00062
00067 void checkInteriorIntersections();
00068
00069 void checkInteriorIntersections(const SegmentString& ss0,
00070 const SegmentString& ss1);
00071
00072 void checkInteriorIntersections(
00073 const SegmentString& e0, unsigned int segIndex0,
00074 const SegmentString& e1, unsigned int segIndex1);
00075
00080 void checkEndPtVertexIntersections() const;
00081
00082 void checkEndPtVertexIntersections(const geom::Coordinate& testPt,
00083 const std::vector<SegmentString*>& segStrings) const;
00084
00089 bool hasInteriorIntersection(const algorithm::LineIntersector& aLi,
00090 const geom::Coordinate& p0, const geom::Coordinate& p1) const;
00091
00092 public:
00093
00094 NodingValidator(const std::vector<SegmentString*>& newSegStrings):
00095 segStrings(newSegStrings)
00096 {}
00097
00098 ~NodingValidator() {}
00099
00100 void checkValid();
00101
00102 };
00103
00104
00105 }
00106 }
00107
00108
00109
00110
00111
00112 #endif // GEOS_NODING_NODINGVALIDATOR_H
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123