GEOS 3.6.2
geomgraph/DirectedEdgeStar.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: geomgraph/DirectedEdgeStar.java r428 (JTS-1.12+)
18 *
19 **********************************************************************/
20
21
22#ifndef GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
23#define GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
24
25#include <geos/export.h>
26#include <set>
27#include <string>
28#include <vector>
29
30#include <geos/geomgraph/EdgeEndStar.h> // for inheritance
31#include <geos/geomgraph/Label.h> // for private member
32#include <geos/geom/Coordinate.h> // for p0,p1
33
34#include <geos/inline.h>
35
36// Forward declarations
37namespace geos {
38 namespace geomgraph {
39 class DirectedEdge;
40 class EdgeRing;
41 }
42}
43
44namespace geos {
45namespace geomgraph { // geos.geomgraph
46
55class GEOS_DLL DirectedEdgeStar: public EdgeEndStar {
56
57public:
58
59 DirectedEdgeStar()
60 :
61 EdgeEndStar(),
62 resultAreaEdgeList(0),
63 label()
64 {}
65
66 ~DirectedEdgeStar() {
67 delete resultAreaEdgeList;
68 }
69
71 void insert(EdgeEnd *ee);
72
73 Label &getLabel() { return label; }
74
75 int getOutgoingDegree();
76
77 int getOutgoingDegree(EdgeRing *er);
78
79 DirectedEdge* getRightmostEdge();
80
85 void computeLabelling(std::vector<GeometryGraph*> *geom); // throw(TopologyException *);
86
92
94 void updateLabelling(const Label& nodeLabel);
95
96
114 void linkResultDirectedEdges(); // throw(TopologyException *);
115
116 void linkMinimalDirectedEdges(EdgeRing *er);
117
118 void linkAllDirectedEdges();
119
127
134
135 virtual std::string print() const;
136
137private:
138
142 std::vector<DirectedEdge*> *resultAreaEdgeList;
143
144 Label label;
145
149 std::vector<DirectedEdge*>* getResultAreaEdges();
150
152 enum {
153 SCANNING_FOR_INCOMING=1,
154 LINKING_TO_OUTGOING
155 };
156
157 int computeDepths(EdgeEndStar::iterator startIt,
158 EdgeEndStar::iterator endIt, int startDepth);
159};
160
161
162} // namespace geos.geomgraph
163} // namespace geos
164
165//#ifdef GEOS_INLINE
166//# include "geos/geomgraph/DirectedEdgeEndStar.inl"
167//#endif
168
169#endif // ifndef GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
170
void computeDepths(DirectedEdge *de)
Compute the DirectedEdge depths for a subsequence of the edge array.
void insert(EdgeEnd *ee)
Insert a directed edge in the list.
void updateLabelling(const Label &nodeLabel)
Update incomplete dirEdge labels from the labelling for the node.
void computeLabelling(std::vector< GeometryGraph * > *geom)
Compute the labelling for all dirEdges in this star, as well as the overall labelling.
void findCoveredLineEdges()
Traverse the star of edges, maintaing the current location in the result area at this node (if any).
void mergeSymLabels()
For each dirEdge in the star, merge the label from the sym dirEdge into the label.
A directed EdgeEnd.
Definition geomgraph/DirectedEdge.h:44
Models the end of an edge incident on a node.
Definition EdgeEnd.h:56
Definition geomgraph/EdgeRing.h:59
A Label indicates the topological relationship of a component of a topology graph to a given Geometry...
Definition Label.h:57
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Contains classes that implement topology graphs.
Definition IndexedNestedRingTester.h:34
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25