GEOS  3.9.1dev
PolygonizeDirectedEdge.h
Go to the documentation of this file.
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 
21 #ifndef GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
22 #define GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
23 
24 #include <geos/export.h>
25 
26 #include <geos/planargraph/DirectedEdge.h> // for inheritance
27 
28 // Forward declarations
29 namespace geos {
30 namespace geom {
31 //class LineString;
32 }
33 namespace planargraph {
34 class Node;
35 }
36 namespace operation {
37 namespace polygonize {
38 class EdgeRing;
39 }
40 }
41 }
42 
43 namespace geos {
44 namespace operation { // geos::operation
45 namespace polygonize { // geos::operation::polygonize
46 
55 
56 private:
57 
59 
61 
62  long label;
63 
64 public:
65 
66  /*
67  * \brief
68  * Constructs a directed edge connecting the <code>from</code> node
69  * to the <code>to</code> node.
70  *
71  * @param directionPt
72  * specifies this DirectedEdge's direction (given by an imaginary
73  * line from the <code>from</code> node to <code>directionPt</code>)
74  *
75  * @param edgeDirection
76  * whether this DirectedEdge's direction is the same as or
77  * opposite to that of the parent Edge (if any)
78  */
80  planargraph::Node* newTo,
81  const geom::Coordinate& newDirectionPt,
82  bool nEdgeDirection);
83 
84  /*
85  * Returns the identifier attached to this directed edge.
86  */
87  long getLabel() const;
88 
89  /*
90  * Attaches an identifier to this directed edge.
91  */
92  void setLabel(long newLabel);
93 
94  /*
95  * Returns the next directed edge in the EdgeRing that this
96  * directed edge is a member of.
97  */
98  PolygonizeDirectedEdge* getNext() const;
99 
100  /*
101  * Gets the EdgeRing this edge is a member of.
102  */
103  EdgeRing* getRing() const {
104  return edgeRing;
105  }
106 
107  /*
108  * Sets the next directed edge in the EdgeRing that this
109  * directed edge is a member of.
110  */
111  void setNext(PolygonizeDirectedEdge* newNext);
112 
113  /*
114  * Returns the ring of directed edges that this directed edge is
115  * a member of, or null if the ring has not been set.
116  * @see #setRing(EdgeRing)
117  */
118  bool isInRing() const;
119 
120  /*
121  * Sets the ring of directed edges that this directed edge is
122  * a member of.
123  */
124  void setRing(EdgeRing* newEdgeRing);
125 };
126 } // namespace geos::operation::polygonize
127 } // namespace geos::operation
128 } // namespace geos
129 
130 #endif // GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
#define GEOS_DLL
Definition: export.h:28
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Represents a directed edge in a PlanarGraph.
A DirectedEdge of a PolygonizeGraph, which represents an edge of a polygon formed by the graph...
Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...
Basic namespace for all GEOS functionalities.
A node in a PlanarGraph is a location where 0 or more Edge meet.