00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_NODING_ITERATEDNODER_H
00021 #define GEOS_NODING_ITERATEDNODER_H
00022
00023 #include <geos/export.h>
00024
00025 #include <vector>
00026 #include <iostream>
00027
00028 #include <geos/inline.h>
00029
00030 #include <geos/algorithm/LineIntersector.h>
00031 #include <geos/noding/SegmentString.h>
00032 #include <geos/noding/Noder.h>
00033
00034
00035 namespace geos {
00036 namespace geom {
00037 class PrecisionModel;
00038 }
00039 }
00040
00041 namespace geos {
00042 namespace noding {
00043
00055 class GEOS_DLL IteratedNoder : public Noder {
00056
00057 private:
00058 static const int MAX_ITER = 5;
00059
00060
00061 const geom::PrecisionModel *pm;
00062 algorithm::LineIntersector li;
00063 std::vector<SegmentString*>* nodedSegStrings;
00064 int maxIter;
00065
00070 void node(std::vector<SegmentString*>* segStrings,
00071 int *numInteriorIntersections);
00072
00073 public:
00074
00075 IteratedNoder(const geom::PrecisionModel *newPm)
00076 :
00077 pm(newPm),
00078 li(pm),
00079 maxIter(MAX_ITER)
00080 {
00081 }
00082
00083 virtual ~IteratedNoder() {}
00084
00094 void setMaximumIterations(int n) { maxIter = n; }
00095
00096 std::vector<SegmentString*>* getNodedSubstrings() const {
00097 return nodedSegStrings;
00098 }
00099
00100
00110 void computeNodes(std::vector<SegmentString*>* inputSegmentStrings);
00111 };
00112
00113 }
00114 }
00115
00116
00117
00118
00119
00120
00121 #endif // GEOS_NODING_ITERATEDNODER_H
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132