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