Table of Contents

Class Edge

Namespace
NetTopologySuite.GeometriesGraph
Assembly
NetTopologySuite.dll
public class Edge : GraphComponent
Inheritance
Edge
Inherited Members

Constructors

Edge(Coordinate[])

public Edge(Coordinate[] pts)

Parameters

pts Coordinate[]

Edge(Coordinate[], Label)

public Edge(Coordinate[] pts, Label label)

Parameters

pts Coordinate[]
label Label

Properties

CollapsedEdge

public Edge CollapsedEdge { get; }

Property Value

Edge

Coordinate

public override Coordinate Coordinate { get; protected set; }

Property Value

Coordinate

Coordinates

public Coordinate[] Coordinates { get; }

Property Value

Coordinate[]

Depth

public Depth Depth { get; }

Property Value

Depth

DepthDelta

The depthDelta is the change in depth as an edge is crossed from R to L.

public int DepthDelta { get; set; }

Property Value

int

The change in depth as the edge is crossed from R to L.

EdgeIntersectionList

public EdgeIntersectionList EdgeIntersectionList { get; }

Property Value

EdgeIntersectionList

Envelope

public Envelope Envelope { get; }

Property Value

Envelope

IsClosed

public bool IsClosed { get; }

Property Value

bool

IsCollapsed

An Edge is collapsed if it is an Area edge and it consists of two segments which are equal and opposite (eg a zero-width V).

public bool IsCollapsed { get; }

Property Value

bool

true if edge is consisting of two segments which are equal and of oppose orientation (Zero-width V area edge)

IsIsolated

public override bool IsIsolated { get; }

Property Value

bool

Isolated

public bool Isolated { get; set; }

Property Value

bool

MaximumSegmentIndex

public int MaximumSegmentIndex { get; }

Property Value

int

MonotoneChainEdge

public MonotoneChainEdge MonotoneChainEdge { get; }

Property Value

MonotoneChainEdge

Name

public string Name { get; set; }

Property Value

string

NumPoints

public int NumPoints { get; }

Property Value

int

Points

public Coordinate[] Points { get; set; }

Property Value

Coordinate[]

Methods

AddIntersection(LineIntersector, int, int, int)

Add an EdgeIntersection for intersection intIndex. An intersection that falls exactly on a vertex of the edge is normalized to use the higher of the two possible segmentIndexes.

public void AddIntersection(LineIntersector li, int segmentIndex, int geomIndex, int intIndex)

Parameters

li LineIntersector

A line intersector

segmentIndex int

A segment index

geomIndex int

A geometry index

intIndex int

The intersection index (0 or 1)

AddIntersections(LineIntersector, int, int)

Adds EdgeIntersections for one or both intersections found for a segment of an edge to the edge intersection list.

public void AddIntersections(LineIntersector li, int segmentIndex, int geomIndex)

Parameters

li LineIntersector

A line intersector

segmentIndex int

A segment index

geomIndex int

A geometry index

ComputeIM(IntersectionMatrix)

Update the IM with the contribution for this component. A component only contributes if it has a labelling for both parent geometries.

public override void ComputeIM(IntersectionMatrix im)

Parameters

im IntersectionMatrix

Equals(Edge)

Equals is defined to be: e1 equals e2 if the coordinates of e1 are the same or the reverse of the coordinates in e2.

protected bool Equals(Edge e)

Parameters

e Edge

Returns

bool

Equals(object)

Equals is defined to be: e1 equals e2 if the coordinates of e1 are the same or the reverse of the coordinates in e2.

public override bool Equals(object o)

Parameters

o object

Returns

bool

GetCoordinate(int)

public Coordinate GetCoordinate(int i)

Parameters

i int

Returns

Coordinate

GetHashCode()

public override int GetHashCode()

Returns

int

IsPointwiseEqual(Edge)

Check if coordinate sequences of the Edges are identical.

public bool IsPointwiseEqual(Edge e)

Parameters

e Edge

The edge to test

Returns

bool

true if the coordinate sequences of the Edges are identical.

ToString()

public override string ToString()

Returns

string

UpdateIM(Label, IntersectionMatrix)

Updates an IM from the label for an edge. Handles edges from both L and A geometries.

public static void UpdateIM(Label label, IntersectionMatrix im)

Parameters

label Label

A label

im IntersectionMatrix

An intersection matrix

Write(TextWriter)

public void Write(TextWriter outstream)

Parameters

outstream TextWriter

WriteReverse(TextWriter)

public void WriteReverse(TextWriter outstream)

Parameters

outstream TextWriter

Operators

operator ==(Edge, Edge)

public static bool operator ==(Edge obj1, Edge obj2)

Parameters

obj1 Edge
obj2 Edge

Returns

bool

operator !=(Edge, Edge)

public static bool operator !=(Edge obj1, Edge obj2)

Parameters

obj1 Edge
obj2 Edge

Returns

bool