00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GEOS_NODING_ITERATEDNODER_H
00020 #define GEOS_NODING_ITERATEDNODER_H
00021
00022 #include <geos/export.h>
00023
00024 #include <vector>
00025 #include <iostream>
00026
00027 #include <geos/inline.h>
00028
00029 #include <geos/algorithm/LineIntersector.h>
00030 #include <geos/noding/SegmentString.h>
00031 #include <geos/noding/Noder.h>
00032
00033
00034 namespace geos {
00035 namespace geom {
00036 class PrecisionModel;
00037 }
00038 }
00039
00040 namespace geos {
00041 namespace noding {
00042
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 #endif // GEOS_NODING_ITERATEDNODER_H