Class PolygonizeGraph
- Namespace
- NetTopologySuite.Operation.Polygonize
- Assembly
- NetTopologySuite.dll
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 DirectedEdges is used to indicate that a directed edge has be logically deleted from the graph.
public class PolygonizeGraph : PlanarGraph
- Inheritance
-
PolygonizeGraph
- Inherited Members
Constructors
PolygonizeGraph(GeometryFactory)
Create a new polygonization graph.
public PolygonizeGraph(GeometryFactory factory)
Parameters
factory
GeometryFactory
Methods
AddEdge(LineString)
Add a LineString
forming an edge of the polygon graph.
public void AddEdge(LineString line)
Parameters
line
LineStringThe line to add.
ComputeDepthParity()
Traverses the polygonized edge rings in the graph and computes the depth parity (odd or even) relative to the exterior of the graph.
If the client has requested that the output be polygonally valid, only odd polygons will be constructed.
public void ComputeDepthParity()
DeleteAllEdges(Node)
Deletes all edges at a node.
public static void DeleteAllEdges(Node node)
Parameters
node
Node
DeleteCutEdges()
Finds and removes all cut edges from the graph.
public IList<LineString> DeleteCutEdges()
Returns
- IList<LineString>
A list of the
LineString
s forming the removed cut edges.
DeleteDangles()
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.
public ICollection<LineString> DeleteDangles()
Returns
- ICollection<LineString>
A List containing the LineStrings that formed dangles.
GetEdgeRings()
Computes the minimal EdgeRings formed by the edges in this graph.
public IList<EdgeRing> GetEdgeRings()