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 public:
00055 friend std::ostream& operator<< (std::ostream& os, const SegmentNode& n);
00056
00058 geom::Coordinate coord;
00059
00061 unsigned int segmentIndex;
00062
00064
00075 SegmentNode(const NodedSegmentString& ss,
00076 const geom::Coordinate& nCoord,
00077 unsigned int nSegmentIndex, int nSegmentOctant);
00078
00079 ~SegmentNode() {}
00080
00086 bool isInterior() const { return isInteriorVar; }
00087
00088 bool isEndPoint(unsigned int maxSegmentIndex) const;
00089
00097 int compareTo(const SegmentNode& other);
00098
00099
00100 };
00101
00102 std::ostream& operator<< (std::ostream& os, const SegmentNode& n);
00103
00104 struct GEOS_DLL SegmentNodeLT {
00105 bool operator()(SegmentNode *s1, SegmentNode *s2) const {
00106 return s1->compareTo(*s2)<0;
00107 }
00108 };
00109
00110
00111 }
00112 }
00113
00114
00115
00116
00117
00118 #endif // GEOS_NODING_SEGMENTNODE_H
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129