Class PolygonizeGraph
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.
Inherited Members
Namespace: NetTopologySuite.Operation.Polygonize
Assembly: NetTopologySuite.dll
Syntax
public class PolygonizeGraph : PlanarGraph
Constructors
| Improve this Doc View SourcePolygonizeGraph(GeometryFactory)
Create a new polygonization graph.
Declaration
public PolygonizeGraph(GeometryFactory factory)
Parameters
Type | Name | Description |
---|---|---|
GeometryFactory | factory |
Methods
| Improve this Doc View SourceAddEdge(LineString)
Add a LineString
forming an edge of the polygon graph.
Declaration
public void AddEdge(LineString line)
Parameters
Type | Name | Description |
---|---|---|
LineString | line | The 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.
Declaration
public void ComputeDepthParity()
DeleteAllEdges(Node)
Deletes all edges at a node.
Declaration
public static void DeleteAllEdges(Node node)
Parameters
Type | Name | Description |
---|---|---|
Node | node |
DeleteCutEdges()
Finds and removes all cut edges from the graph.
Declaration
public IList<LineString> DeleteCutEdges()
Returns
Type | Description |
---|---|
IList<LineString> | A list of the |
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.
Declaration
public ICollection<LineString> DeleteDangles()
Returns
Type | Description |
---|---|
ICollection<LineString> | A List containing the LineStrings that formed dangles. |
GetEdgeRings()
Computes the minimal EdgeRings formed by the edges in this graph.
Declaration
public IList<EdgeRing> GetEdgeRings()
Returns
Type | Description |
---|---|
IList<EdgeRing> | A list of the{EdgeRings found by the polygonization process. |