PolygonizeDirectedEdge.h

00001 /**********************************************************************
00002  *
00003  * GEOS - Geometry Engine Open Source
00004  * http://geos.osgeo.org
00005  *
00006  * Copyright (C) 2006 Refractions Research Inc.
00007  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00008  *
00009  * This is free software; you can redistribute and/or modify it under
00010  * the terms of the GNU Lesser General Public Licence as published
00011  * by the Free Software Foundation. 
00012  * See the COPYING file for more information.
00013  *
00014  **********************************************************************
00015  *
00016  * Last port: operation/polygonize/PolygonizeDirectedEdge.java rev. 1.4 (JTS-1.10)
00017  *
00018  **********************************************************************/
00019 
00020 
00021 #ifndef GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
00022 #define GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
00023 
00024 #include <geos/export.h>
00025 
00026 #include <geos/planargraph/DirectedEdge.h> // for inheritance
00027 
00028 // Forward declarations
00029 namespace geos {
00030         namespace geom { 
00031                 //class LineString;
00032         }
00033         namespace planargraph { 
00034                 class Node;
00035         }
00036         namespace operation { 
00037                 namespace polygonize { 
00038                         class EdgeRing;
00039                 }
00040         }
00041 }
00042 
00043 namespace geos {
00044 namespace operation { // geos::operation
00045 namespace polygonize { // geos::operation::polygonize
00046 
00054 class GEOS_DLL PolygonizeDirectedEdge: public planargraph::DirectedEdge {
00055 
00056 private:
00057 
00058         EdgeRing *edgeRing;
00059 
00060         PolygonizeDirectedEdge *next;
00061 
00062         long label;
00063 
00064 public:
00065 
00066         /*
00067          * \brief
00068          * Constructs a directed edge connecting the <code>from</code> node
00069          * to the <code>to</code> node.
00070          *
00071          * @param directionPt
00072          *    specifies this DirectedEdge's direction (given by an imaginary
00073          *    line from the <code>from</code> node to <code>directionPt</code>)
00074          *
00075          * @param edgeDirection
00076          *    whether this DirectedEdge's direction is the same as or
00077          *    opposite to that of the parent Edge (if any)
00078          */
00079         PolygonizeDirectedEdge(planargraph::Node *newFrom,
00080                         planargraph::Node *newTo,
00081                         const geom::Coordinate& newDirectionPt,
00082                         bool nEdgeDirection);
00083 
00084         /*
00085          * Returns the identifier attached to this directed edge.
00086          */
00087         long getLabel() const;
00088 
00089         /*
00090          * Attaches an identifier to this directed edge.
00091          */
00092         void setLabel(long newLabel);
00093 
00094         /*
00095          * Returns the next directed edge in the EdgeRing that this
00096          * directed edge is a member of.
00097          */
00098         PolygonizeDirectedEdge* getNext() const;
00099 
00100         /*
00101          * Sets the next directed edge in the EdgeRing that this
00102          * directed edge is a member of.
00103          */
00104         void setNext(PolygonizeDirectedEdge *newNext);
00105 
00106         /*
00107          * Returns the ring of directed edges that this directed edge is
00108          * a member of, or null if the ring has not been set.
00109          * @see #setRing(EdgeRing)
00110          */
00111         bool isInRing() const;
00112 
00113         /*
00114          * Sets the ring of directed edges that this directed edge is
00115          * a member of.
00116          */
00117         void setRing(EdgeRing *newEdgeRing);
00118 };
00119 } // namespace geos::operation::polygonize
00120 } // namespace geos::operation
00121 } // namespace geos
00122 
00123 #endif // GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H

Generated on 15 May 2014 for GEOS by  doxygen 1.4.7