00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_NODING_SEGMENTNODE_H
00021 #define GEOS_NODING_SEGMENTNODE_H
00022
00023 #include <geos/export.h>
00024
00025 #include <vector>
00026 #include <iostream>
00027
00028 #include <geos/inline.h>
00029
00030 #include <geos/geom/Coordinate.h>
00031
00032
00033 namespace geos {
00034 namespace noding {
00035 class NodedSegmentString;
00036 }
00037 }
00038
00039 namespace geos {
00040 namespace noding {
00041
00043
00046 class GEOS_DLL SegmentNode {
00047 private:
00048 const NodedSegmentString& segString;
00049
00050 int segmentOctant;
00051
00052 bool isInteriorVar;
00053
00054
00055 SegmentNode(const SegmentNode& other);
00056 SegmentNode& operator=(const SegmentNode& rhs);
00057
00058 public:
00059 friend std::ostream& operator<< (std::ostream& os, const SegmentNode& n);
00060
00062 geom::Coordinate coord;
00063
00065 unsigned int segmentIndex;
00066
00068
00079 SegmentNode(const NodedSegmentString& ss,
00080 const geom::Coordinate& nCoord,
00081 unsigned int nSegmentIndex, int nSegmentOctant);
00082
00083 ~SegmentNode() {}
00084
00090 bool isInterior() const { return isInteriorVar; }
00091
00092 bool isEndPoint(unsigned int maxSegmentIndex) const;
00093
00101 int compareTo(const SegmentNode& other);
00102
00103
00104 };
00105
00106 std::ostream& operator<< (std::ostream& os, const SegmentNode& n);
00107
00108 struct GEOS_DLL SegmentNodeLT {
00109 bool operator()(SegmentNode *s1, SegmentNode *s2) const {
00110 return s1->compareTo(*s2)<0;
00111 }
00112 };
00113
00114
00115 }
00116 }
00117
00118
00119
00120
00121
00122 #endif // GEOS_NODING_SEGMENTNODE_H
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133