Table of Contents

Class TopologyLocation

Namespace
NetTopologySuite.GeometriesGraph
Assembly
NetTopologySuite.dll

A TopologyLocation is the labelling of a GraphComponent's topological relationship to a single Geometry.

public class TopologyLocation
Inheritance
TopologyLocation
Inherited Members

Remarks

If the parent component is an area edge, each side and the edge itself have a topological location. These locations are named:

Onon the edge
Leftleft-hand side of the edge
Rightright-hand side

If the parent component is a line edge or node, there is a single topological relationship attribute, On.

The possible values of a topological location are { Null, Exterior, Boundary, Interior }

The labelling is stored in an array _location[j] where where j has the values On, Left, Right.

Constructors

TopologyLocation(Location)

public TopologyLocation(Location on)

Parameters

on Location

TopologyLocation(Location, Location, Location)

Constructs a TopologyLocation specifying how points on, to the left of, and to the right of some GraphComponent relate to some Geometry. Possible values for the parameters are Location.Null, Location.Exterior, Location.Boundary, and Location.Interior.

public TopologyLocation(Location on, Location left, Location right)

Parameters

on Location

Location for On position

left Location

Location for Left position

right Location

Location for Right position

TopologyLocation(Location[])

public TopologyLocation(Location[] location)

Parameters

location Location[]

TopologyLocation(TopologyLocation)

public TopologyLocation(TopologyLocation gl)

Parameters

gl TopologyLocation

Properties

IsAnyNull

public bool IsAnyNull { get; }

Property Value

bool

true if any locations are Null.

IsArea

public bool IsArea { get; }

Property Value

bool

IsLine

public bool IsLine { get; }

Property Value

bool

IsNull

public bool IsNull { get; }

Property Value

bool

true if all locations are Null.

this[Position]

Get calls Get(Positions posIndex), Set calls SetLocation(Positions locIndex, Location locValue)

public Location this[Position posIndex] { get; set; }

Parameters

posIndex Position

Property Value

Location

this[Positions]

Get calls Get(Positions posIndex), Set calls SetLocation(Positions locIndex, Location locValue)

[Obsolete("Use the Geometries.Position indexer instead")]
public Location this[Positions posIndex] { get; set; }

Parameters

posIndex Positions

Property Value

Location

Methods

AllPositionsEqual(Location)

public bool AllPositionsEqual(Location loc)

Parameters

loc Location

Returns

bool

Flip()

public void Flip()

Get(Position)

public Location Get(Position posIndex)

Parameters

posIndex Position

Returns

Location

Get(Positions)

[Obsolete("Use Get(Geometries.Position)")]
public Location Get(Positions posIndex)

Parameters

posIndex Positions

Returns

Location

GetLocations()

public Location[] GetLocations()

Returns

Location[]

IsEqualOnSide(TopologyLocation, int)

public bool IsEqualOnSide(TopologyLocation le, int locIndex)

Parameters

le TopologyLocation
locIndex int

Returns

bool

Merge(TopologyLocation)

Merge updates only the Null attributes of this object with the attributes of another.

public void Merge(TopologyLocation gl)

Parameters

gl TopologyLocation

SetAllLocations(Location)

public void SetAllLocations(Location locValue)

Parameters

locValue Location

SetAllLocationsIfNull(Location)

public void SetAllLocationsIfNull(Location locValue)

Parameters

locValue Location

SetLocation(Location)

public void SetLocation(Location locValue)

Parameters

locValue Location

SetLocation(Position, Location)

public void SetLocation(Position locIndex, Location locValue)

Parameters

locIndex Position
locValue Location

SetLocation(Positions, Location)

[Obsolete("Use SetLocation(Geometries.Position, Location)")]
public void SetLocation(Positions locIndex, Location locValue)

Parameters

locIndex Positions
locValue Location

SetLocations(Location, Location, Location)

public void SetLocations(Location on, Location left, Location right)

Parameters

on Location
left Location
right Location

SetLocations(TopologyLocation)

public void SetLocations(TopologyLocation gl)

Parameters

gl TopologyLocation

ToString()

public override string ToString()

Returns

string