GEOS  3.3.7
Public Member Functions | Static Public Member Functions
geos::operation::polygonize::PolygonizeGraph Class Reference

Represents a planar graph of edges that can be used to compute a polygonization, and implements the algorithms to compute the EdgeRings formed by the graph. More...

#include <PolygonizeGraph.h>

Inheritance diagram for geos::operation::polygonize::PolygonizeGraph:
geos::planargraph::PlanarGraph

List of all members.

Public Member Functions

 PolygonizeGraph (const geom::GeometryFactory *newFactory)
 Create a new polygonization graph.
 ~PolygonizeGraph ()
 Destroy a polygonization graph.
void addEdge (const geom::LineString *line)
 Add a LineString forming an edge of the polygon graph.
void getEdgeRings (std::vector< EdgeRing * > &edgeRingList)
 Computes the EdgeRings formed by the edges in this graph.
void deleteCutEdges (std::vector< const geom::LineString * > &cutLines)
 Finds and removes all cut edges from the graph.
void deleteDangles (std::vector< const geom::LineString * > &dangleLines)
 Marks all edges from the graph which are "dangles".

Static Public Member Functions

static void deleteAllEdges (planargraph::Node *node)
 Deletes all edges at a node.

Detailed Description

Represents a planar graph of edges that can be used to compute a polygonization, and implements the algorithms to compute the EdgeRings formed by the graph.

The marked flag on DirectedEdge is used to indicate that a directed edge has be logically deleted from the graph.


Member Function Documentation

Add a LineString forming an edge of the polygon graph.

Parameters:
linethe line to add

Finds and removes all cut edges from the graph.

Parameters:
cutLines: the list of the LineString forming the removed cut edges will be pushed here.

TODO: document ownership of the returned LineStrings

void geos::operation::polygonize::PolygonizeGraph::deleteDangles ( std::vector< const geom::LineString * > &  dangleLines)

Marks all edges from the graph which are "dangles".

Dangles are which are incident on a node with degree 1. This process is recursive, since removing a dangling edge may result in another edge becoming a dangle. In order to handle large recursion depths efficiently, an explicit recursion stack is used

Parameters:
dangleLines: the LineStrings that formed dangles will be push_back'ed here
void geos::operation::polygonize::PolygonizeGraph::getEdgeRings ( std::vector< EdgeRing * > &  edgeRingList)

Computes the EdgeRings formed by the edges in this graph.

Parameters:
edgeRingList: the EdgeRing found by the polygonization process will be pushed here.

The documentation for this class was generated from the following file: