00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
00019 #define GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
00020
00021 #include <set>
00022 #include <string>
00023 #include <vector>
00024
00025 #include <geos/geomgraph/EdgeEndStar.h>
00026 #include <geos/geomgraph/Label.h>
00027 #include <geos/geom/Coordinate.h>
00028
00029 #include <geos/inline.h>
00030
00031
00032 namespace geos {
00033 namespace geomgraph {
00034 class DirectedEdge;
00035 class EdgeRing;
00036 }
00037 }
00038
00039 namespace geos {
00040 namespace geomgraph {
00041
00051 class DirectedEdgeStar: public EdgeEndStar {
00052
00053 public:
00054
00055 DirectedEdgeStar()
00056 :
00057 EdgeEndStar(),
00058 resultAreaEdgeList(0),
00059 label()
00060 {}
00061
00062 ~DirectedEdgeStar() {
00063 delete resultAreaEdgeList;
00064 }
00065
00067 void insert(EdgeEnd *ee);
00068
00069 Label &getLabel() { return label; }
00070
00071 int getOutgoingDegree();
00072
00073 int getOutgoingDegree(EdgeRing *er);
00074
00075 DirectedEdge* getRightmostEdge();
00076
00081 void computeLabelling(std::vector<GeometryGraph*> *geom);
00082
00087 void mergeSymLabels();
00088
00090 void updateLabelling(Label *nodeLabel);
00091
00092
00110 void linkResultDirectedEdges();
00111
00112 void linkMinimalDirectedEdges(EdgeRing *er);
00113
00114 void linkAllDirectedEdges();
00115
00122 void findCoveredLineEdges();
00123
00129 void computeDepths(DirectedEdge *de);
00130
00131 std::string print();
00132
00133 private:
00134
00138 std::vector<DirectedEdge*> *resultAreaEdgeList;
00139
00140 Label label;
00141
00145 std::vector<DirectedEdge*>* getResultAreaEdges();
00146
00148 enum {
00149 SCANNING_FOR_INCOMING=1,
00150 LINKING_TO_OUTGOING
00151 };
00152
00153 int computeDepths(EdgeEndStar::iterator startIt,
00154 EdgeEndStar::iterator endIt, int startDepth);
00155 };
00156
00157
00158 }
00159 }
00160
00161
00162
00163
00164
00165 #endif // ifndef GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182