GEOS 3.6.2
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
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
29namespace 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
43namespace geos {
44namespace operation { // geos::operation
45namespace polygonize { // geos::operation::polygonize
46
54class GEOS_DLL PolygonizeDirectedEdge: public planargraph::DirectedEdge {
55
56private:
57
58 EdgeRing *edgeRing;
59
60 PolygonizeDirectedEdge *next;
61
62 long label;
63
64public:
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 */
79 PolygonizeDirectedEdge(planargraph::Node *newFrom,
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 * Sets the next directed edge in the EdgeRing that this
102 * directed edge is a member of.
103 */
104 void setNext(PolygonizeDirectedEdge *newNext);
105
106 /*
107 * Returns the ring of directed edges that this directed edge is
108 * a member of, or null if the ring has not been set.
109 * @see #setRing(EdgeRing)
110 */
111 bool isInRing() const;
112
113 /*
114 * Sets the ring of directed edges that this directed edge is
115 * a member of.
116 */
117 void setRing(EdgeRing *newEdgeRing);
118};
119} // namespace geos::operation::polygonize
120} // namespace geos::operation
121} // namespace geos
122
123#endif // GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...
Definition operation/polygonize/EdgeRing.h:57
Represents a directed edge in a PlanarGraph.
Definition planargraph/DirectedEdge.h:46
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition planargraph/Node.h:45
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Provides classes for implementing operations on geometries.
Definition IndexedNestedRingTester.h:40
Contains classes to implement a planar graph data structure.
Definition LineMergeDirectedEdge.h:32
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25