Table of Contents

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 DirectedEdge

The start DirectedEdge for the EdgeRing

geometryFactory GeometryFactory

A GeometryFactory

Fields

startDe

The directed edge which starts the list of edges for this EdgeRing.

protected DirectedEdge startDe

Field Value

DirectedEdge

Properties

Edges

Returns the list of DirectedEdges that make up this EdgeRing.

public IList<DirectedEdge> Edges { get; }

Property Value

IList<DirectedEdge>

A list of DirectedEdges

GeometryFactory

A GeometryFactory to use.

protected GeometryFactory GeometryFactory { get; }

Property Value

GeometryFactory

IsHole

Gets a value indicating if this EdgeRing is a hole of a Polygon

public bool IsHole { get; }

Property Value

bool

IsIsolated

Gets a value indicating if this EdgeRing is isolated

public bool IsIsolated { get; }

Property Value

bool

IsShell

public bool IsShell { get; }

Property Value

bool

Label

Gets a value indicating the topological relationship of this EdgeRing

public Label Label { get; }

Property Value

Label

LinearRing

Gets the geometry representation of this EdgeRing

public LinearRing LinearRing { get; }

Property Value

LinearRing

MaxNodeDegree

public int MaxNodeDegree { get; }

Property Value

int

Shell

public EdgeRing Shell { get; set; }

Property Value

EdgeRing

Methods

AddHole(EdgeRing)

Add an EdgeRing representing a hole

public void AddHole(EdgeRing ring)

Parameters

ring EdgeRing

The ring to add

AddPoints(Edge, bool, bool)

protected void AddPoints(Edge edge, bool isForward, bool isFirstEdge)

Parameters

edge Edge
isForward bool
isFirstEdge bool

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 Coordinate

The point to test

Returns

bool

true if the ring contains point p

GetCoordinate(int)

Access a Coordinate of this EdgeRing by its index.

public Coordinate GetCoordinate(int i)

Parameters

i int

The index of the Coordinate

Returns

Coordinate

The Coordinate at index i

GetNext(DirectedEdge)

public abstract DirectedEdge GetNext(DirectedEdge de)

Parameters

de DirectedEdge

Returns

DirectedEdge

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

deLabel Label
geomIndex int

SetEdgeRing(DirectedEdge, EdgeRing)

public abstract void SetEdgeRing(DirectedEdge de, EdgeRing er)

Parameters

de DirectedEdge
er EdgeRing

SetInResult()

public void SetInResult()

ToPolygon(GeometryFactory)

Create the Polygon described by this EdgeRing

public Polygon ToPolygon(GeometryFactory geometryFactory)

Parameters

geometryFactory GeometryFactory

The GeometryFactory to use.

Returns

Polygon

A Polygon