PolygonizeDirectedEdge.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2006 Refractions Research Inc.
* Copyright (C) 2001-2002 Vivid Solutions Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: operation/polygonize/PolygonizeDirectedEdge.java rev. 1.4 (JTS-1.10)
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <geos/planargraph/DirectedEdge.h> // for inheritance
// Forward declarations
namespace geos {
namespace geom {
//class LineString;
}
namespace planargraph {
class Node;
}
namespace operation {
namespace polygonize {
class EdgeRing;
}
}
}
namespace geos {
namespace operation { // geos::operation
namespace polygonize { // geos::operation::polygonize
class GEOS_DLL PolygonizeDirectedEdge: public planargraph::DirectedEdge {
private:
EdgeRing* edgeRing;
PolygonizeDirectedEdge* next;
long label;
public:
/*
* \brief
* Constructs a directed edge connecting the <code>from</code> node
* to the <code>to</code> node.
*
* @param directionPt
* specifies this DirectedEdge's direction (given by an imaginary
* line from the <code>from</code> node to <code>directionPt</code>)
*
* @param edgeDirection
* whether this DirectedEdge's direction is the same as or
* opposite to that of the parent Edge (if any)
*/
PolygonizeDirectedEdge(planargraph::Node* newFrom,
planargraph::Node* newTo,
const geom::Coordinate& newDirectionPt,
bool nEdgeDirection);
/*
* Returns the identifier attached to this directed edge.
*/
long getLabel() const;
/*
* Attaches an identifier to this directed edge.
*/
void setLabel(long newLabel);
/*
* Returns the next directed edge in the EdgeRing that this
* directed edge is a member of.
*/
PolygonizeDirectedEdge* getNext() const;
/*
* Gets the EdgeRing this edge is a member of.
*/
EdgeRing* getRing() const {
return edgeRing;
}
/*
* Sets the next directed edge in the EdgeRing that this
* directed edge is a member of.
*/
void setNext(PolygonizeDirectedEdge* newNext);
/*
* Returns the ring of directed edges that this directed edge is
* a member of, or null if the ring has not been set.
* @see #setRing(EdgeRing)
*/
bool isInRing() const;
/*
* Sets the ring of directed edges that this directed edge is
* a member of.
*/
void setRing(EdgeRing* newEdgeRing);
};
} // namespace geos::operation::polygonize
} // namespace geos::operation
} // namespace geos
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
geos::operation::polygonize::EdgeRing
Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...
Definition operation/polygonize/EdgeRing.h:59
geos::planargraph::DirectedEdge
Represents a directed edge in a PlanarGraph.
Definition planargraph/DirectedEdge.h:45
geos::planargraph::Node
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition planargraph/Node.h:44
geos::geom
Definition Angle.h:26
geos::operation::polygonize
An API for polygonizing sets of lines.
Definition namespaces.h:232
geos::operation
Provides classes for implementing operations on geometries.
Definition CleanCoverage.h:34
geos::planargraph
Contains classes to implement a planar graph data structure.
Definition namespaces.h:293
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38