Table of Contents

Struct Position

Namespace
NetTopologySuite.Geometries
Assembly
NetTopologySuite.dll

Indicates the position of a location relative to a node or edge component of a planar topological structure.

public readonly struct Position
Inherited Members

Fields

Left

Specifies that a location is to the left of a component

public static Position Left

Field Value

Position

1

On

Specifies that a location is on a component

public static Position On

Field Value

Position

0

Parallel

Specifies that a location is is parallel to x-axis of a component

public static Position Parallel

Field Value

Position

-1

Right

Specifies that a location is to the right of a component

public static Position Right

Field Value

Position

2

Properties

Opposite

Returns Left if the position is Right, Right if the position is Left, or the position otherwise.

public Position Opposite { get; }

Property Value

Position

Methods

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(Position, Position)

Equality comparer for Position indices

public static bool operator ==(Position lhs, Position rhs)

Parameters

lhs Position

The position index on the left-hand-side

rhs Position

The position index on the right-hand-side

Returns

bool

true if both indices are equal.

implicit operator int(Position)

Implicit conversion operator for Position to int conversion.

public static implicit operator int(Position pos)

Parameters

pos Position

The position index

Returns

int

operator !=(Position, Position)

Inequality comparer for Position indices

public static bool operator !=(Position lhs, Position rhs)

Parameters

lhs Position

The position index on the left-hand-side

rhs Position

The position index on the right-hand-side

Returns

bool

true if both indices are not equal.