00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_NODING_SEGMENTNODE_H
00017 #define GEOS_NODING_SEGMENTNODE_H
00018
00019 #include <vector>
00020 #include <iostream>
00021
00022 #include <geos/inline.h>
00023
00024 #include <geos/geom/Coordinate.h>
00025
00026
00027 namespace geos {
00028 namespace noding {
00029 class SegmentString;
00030 }
00031 }
00032
00033 namespace geos {
00034 namespace noding {
00035
00037
00042 class SegmentNode {
00043 private:
00044 const SegmentString& segString;
00045
00046 int segmentOctant;
00047
00048 bool isInteriorVar;
00049
00050 public:
00051 friend std::ostream& operator<< (std::ostream& os, const SegmentNode& n);
00052
00054 geom::Coordinate coord;
00055
00057 unsigned int segmentIndex;
00058
00060
00070 SegmentNode(const SegmentString& ss, const geom::Coordinate& nCoord,
00071 unsigned int nSegmentIndex, int nSegmentOctant);
00072
00073 ~SegmentNode() {}
00074
00080 bool isInterior() const { return isInteriorVar; }
00081
00082 bool isEndPoint(unsigned int maxSegmentIndex) const;
00083
00091 int compareTo(const SegmentNode& other);
00092
00093
00094 };
00095
00096 std::ostream& operator<< (std::ostream& os, const SegmentNode& n);
00097
00098 struct SegmentNodeLT {
00099 bool operator()(SegmentNode *s1, SegmentNode *s2) const {
00100 return s1->compareTo(*s2)<0;
00101 }
00102 };
00103
00104
00105 }
00106 }
00107
00108
00109
00110
00111
00112 #endif // GEOS_NODING_SEGMENTNODE_H
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123