Class EdgeRing
- Namespace
- NetTopologySuite.GeometriesGraph
- Assembly
- NetTopologySuite.dll
public abstract class EdgeRing
- Inheritance
-
EdgeRing
- Derived
- Inherited Members
Constructors
EdgeRing(DirectedEdge, GeometryFactory)
Creates an instance of this class using the provided start
and geometryFactory
.
protected EdgeRing(DirectedEdge start, GeometryFactory geometryFactory)
Parameters
start
DirectedEdgeThe start
DirectedEdge
for theEdgeRing
geometryFactory
GeometryFactoryA
GeometryFactory
Fields
startDe
The directed edge which starts the list of edges for this EdgeRing.
protected DirectedEdge startDe
Field Value
Properties
Edges
Returns the list of DirectedEdges that make up this EdgeRing.
public IList<DirectedEdge> Edges { get; }
Property Value
- IList<DirectedEdge>
A list of
DirectedEdge
s
GeometryFactory
A GeometryFactory
to use.
protected GeometryFactory GeometryFactory { get; }
Property Value
IsHole
Gets a value indicating if this EdgeRing
is a hole of a Polygon
public bool IsHole { get; }
Property Value
IsIsolated
Gets a value indicating if this EdgeRing
is isolated
public bool IsIsolated { get; }
Property Value
IsShell
public bool IsShell { get; }
Property Value
Label
Gets a value indicating the topological relationship of this EdgeRing
public Label Label { get; }
Property Value
LinearRing
Gets the geometry representation of this EdgeRing
public LinearRing LinearRing { get; }
Property Value
MaxNodeDegree
public int MaxNodeDegree { get; }
Property Value
Shell
public EdgeRing Shell { get; set; }
Property Value
Methods
AddHole(EdgeRing)
Add an EdgeRing
representing a hole
public void AddHole(EdgeRing ring)
Parameters
ring
EdgeRingThe ring to add
AddPoints(Edge, bool, bool)
protected void AddPoints(Edge edge, bool isForward, bool isFirstEdge)
Parameters
ComputePoints(DirectedEdge)
Collect all the points from the DirectedEdges of this ring into a contiguous list.
protected void ComputePoints(DirectedEdge start)
Parameters
start
DirectedEdge
ComputeRing()
Compute a LinearRing from the point list previously collected. Test if the ring is a hole (i.e. if it is CCW) and set the hole flag accordingly.
public void ComputeRing()
ContainsPoint(Coordinate)
This method will cause the ring to be computed. It will also check any holes, if they have been assigned.
public bool ContainsPoint(Coordinate p)
Parameters
p
CoordinateThe point to test
Returns
- bool
true
if the ring contains pointp
GetCoordinate(int)
Access a Coordinate
of this EdgeRing
by its index.
public Coordinate GetCoordinate(int i)
Parameters
i
intThe index of the
Coordinate
Returns
- Coordinate
The
Coordinate
at indexi
GetNext(DirectedEdge)
public abstract DirectedEdge GetNext(DirectedEdge de)
Parameters
de
DirectedEdge
Returns
MergeLabel(Label)
protected void MergeLabel(Label deLabel)
Parameters
deLabel
Label
MergeLabel(Label, int)
Merge the RHS label from a DirectedEdge into the label for this EdgeRing. The DirectedEdge label may be null. This is acceptable - it results from a node which is NOT an intersection node between the Geometries (e.g. the end node of a LinearRing). In this case the DirectedEdge label does not contribute any information to the overall labelling, and is simply skipped.
protected void MergeLabel(Label deLabel, int geomIndex)
Parameters
SetEdgeRing(DirectedEdge, EdgeRing)
public abstract void SetEdgeRing(DirectedEdge de, EdgeRing er)
Parameters
de
DirectedEdgeer
EdgeRing
SetInResult()
public void SetInResult()
ToPolygon(GeometryFactory)
Create the Polygon
described by this EdgeRing
public Polygon ToPolygon(GeometryFactory geometryFactory)
Parameters
geometryFactory
GeometryFactoryThe
GeometryFactory
to use.
Returns
- Polygon
A
Polygon