GEOS  3.13.0dev
PolygonizeDirectedEdge.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2006 Refractions Research Inc.
7  * Copyright (C) 2001-2002 Vivid Solutions Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************
15  *
16  * Last port: operation/polygonize/PolygonizeDirectedEdge.java rev. 1.4 (JTS-1.10)
17  *
18  **********************************************************************/
19 
20 #pragma once
21 
22 #include <geos/export.h>
23 
24 #include <geos/planargraph/DirectedEdge.h> // for inheritance
25 
26 // Forward declarations
27 namespace geos {
28 namespace geom {
29 //class LineString;
30 }
31 namespace planargraph {
32 class Node;
33 }
34 namespace operation {
35 namespace polygonize {
36 class EdgeRing;
37 }
38 }
39 }
40 
41 namespace geos {
42 namespace operation { // geos::operation
43 namespace polygonize { // geos::operation::polygonize
44 
53 
54 private:
55 
56  EdgeRing* edgeRing;
57 
59 
60  long label;
61 
62 public:
63 
64  /*
65  * \brief
66  * Constructs a directed edge connecting the <code>from</code> node
67  * to the <code>to</code> node.
68  *
69  * @param directionPt
70  * specifies this DirectedEdge's direction (given by an imaginary
71  * line from the <code>from</code> node to <code>directionPt</code>)
72  *
73  * @param edgeDirection
74  * whether this DirectedEdge's direction is the same as or
75  * opposite to that of the parent Edge (if any)
76  */
78  planargraph::Node* newTo,
79  const geom::Coordinate& newDirectionPt,
80  bool nEdgeDirection);
81 
82  /*
83  * Returns the identifier attached to this directed edge.
84  */
85  long getLabel() const;
86 
87  /*
88  * Attaches an identifier to this directed edge.
89  */
90  void setLabel(long newLabel);
91 
92  /*
93  * Returns the next directed edge in the EdgeRing that this
94  * directed edge is a member of.
95  */
96  PolygonizeDirectedEdge* getNext() const;
97 
98  /*
99  * Gets the EdgeRing this edge is a member of.
100  */
101  EdgeRing* getRing() const {
102  return edgeRing;
103  }
104 
105  /*
106  * Sets the next directed edge in the EdgeRing that this
107  * directed edge is a member of.
108  */
109  void setNext(PolygonizeDirectedEdge* newNext);
110 
111  /*
112  * Returns the ring of directed edges that this directed edge is
113  * a member of, or null if the ring has not been set.
114  * @see #setRing(EdgeRing)
115  */
116  bool isInRing() const;
117 
118  /*
119  * Sets the ring of directed edges that this directed edge is
120  * a member of.
121  */
122  void setRing(EdgeRing* newEdgeRing);
123 };
124 } // namespace geos::operation::polygonize
125 } // namespace geos::operation
126 } // namespace geos
127 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:216
Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...
Definition: operation/polygonize/EdgeRing.h:59
A DirectedEdge of a PolygonizeGraph, which represents an edge of a polygon formed by the graph.
Definition: PolygonizeDirectedEdge.h:52
Represents a directed edge in a PlanarGraph.
Definition: planargraph/DirectedEdge.h:45
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition: planargraph/Node.h:44
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25