00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
00023 #define GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
00024
00025 #include <geos/export.h>
00026 #include <set>
00027 #include <string>
00028 #include <vector>
00029
00030 #include <geos/geomgraph/EdgeEndStar.h>
00031 #include <geos/geomgraph/Label.h>
00032 #include <geos/geom/Coordinate.h>
00033
00034 #include <geos/inline.h>
00035
00036
00037 namespace geos {
00038 namespace geomgraph {
00039 class DirectedEdge;
00040 class EdgeRing;
00041 }
00042 }
00043
00044 namespace geos {
00045 namespace geomgraph {
00046
00055 class GEOS_DLL DirectedEdgeStar: public EdgeEndStar {
00056
00057 public:
00058
00059 DirectedEdgeStar()
00060 :
00061 EdgeEndStar(),
00062 resultAreaEdgeList(0),
00063 label()
00064 {}
00065
00066 ~DirectedEdgeStar() {
00067 delete resultAreaEdgeList;
00068 }
00069
00071 void insert(EdgeEnd *ee);
00072
00073 Label &getLabel() { return label; }
00074
00075 int getOutgoingDegree();
00076
00077 int getOutgoingDegree(EdgeRing *er);
00078
00079 DirectedEdge* getRightmostEdge();
00080
00085 void computeLabelling(std::vector<GeometryGraph*> *geom);
00086
00091 void mergeSymLabels();
00092
00094 void updateLabelling(Label *nodeLabel);
00095
00096
00114 void linkResultDirectedEdges();
00115
00116 void linkMinimalDirectedEdges(EdgeRing *er);
00117
00118 void linkAllDirectedEdges();
00119
00126 void findCoveredLineEdges();
00127
00133 void computeDepths(DirectedEdge *de);
00134
00135 std::string print();
00136
00137 private:
00138
00142 std::vector<DirectedEdge*> *resultAreaEdgeList;
00143
00144 Label label;
00145
00149 std::vector<DirectedEdge*>* getResultAreaEdges();
00150
00152 enum {
00153 SCANNING_FOR_INCOMING=1,
00154 LINKING_TO_OUTGOING
00155 };
00156
00157 int computeDepths(EdgeEndStar::iterator startIt,
00158 EdgeEndStar::iterator endIt, int startDepth);
00159 };
00160
00161
00162 }
00163 }
00164
00165
00166
00167
00168
00169 #endif // ifndef GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186