Class Label
A Label
indicates the topological relationship of a component
of a topology graph to a given Geometry
.
This class supports labels for relationships to two Geometry
s,
which is sufficient for algorithms for binary operations.
Topology graphs support the concept of labeling nodes and edges in the graph.
The label of a node or edge specifies its topological relationship to one or
more geometries. (In fact, since NTS operations have only two arguments labels
are required for only two geometries). A label for a node or edge has one or
two elements, depending on whether the node or edge occurs in one or both of the
input Geometry
s. Elements contain attributes which categorize the
topological location of the node or edge relative to the parent
Geometry
; that is, whether the node or edge is in the interior,
boundary or exterior of the Geometry
. Attributes have a value
from the set {Interior, Boundary, Exterior}
. In a node each
element has a single attribute On
. For an edge each element has a
triplet of attributes Left, On, Right
.
It is up to the client code to associate the 0 and 1 TopologyLocation
s
with specific geometries.
Assembly: NetTopologySuite.dll
Syntax
Constructors
|
Improve this Doc
View Source
Label(Location)
Construct a Label with a single location for both Geometries.
Initialize the locations to Null.
Declaration
public Label(Location onLoc)
Parameters
Type |
Name |
Description |
Location |
onLoc |
A location value
|
|
Improve this Doc
View Source
Label(Location, Location, Location)
Construct a Label with On, Left and Right locations for both Geometries.
Initialize the locations for both Geometries to the given values.
Declaration
public Label(Location onLoc, Location leftLoc, Location rightLoc)
Parameters
Type |
Name |
Description |
Location |
onLoc |
A location value for On
|
Location |
leftLoc |
A location value for Left
|
Location |
rightLoc |
A location value for Right
|
|
Improve this Doc
View Source
Label(Label)
Construct a Label with the same values as the argument Label.
Declaration
Parameters
Type |
Name |
Description |
Label |
lbl |
A Label
|
|
Improve this Doc
View Source
Label(Int32, Location)
Construct a Label with a single location for both Geometries.
Initialize the location for the Geometry index.
Declaration
public Label(int geomIndex, Location onLoc)
Parameters
Type |
Name |
Description |
Int32 |
geomIndex |
A geometry index, 0 , or 1 .
|
Location |
onLoc |
A location value for On
|
|
Improve this Doc
View Source
Label(Int32, Location, Location, Location)
Construct a Label with On, Left and Right locations for both Geometries.
Initialize the locations for the given Geometry index.
Declaration
public Label(int geomIndex, Location onLoc, Location leftLoc, Location rightLoc)
Parameters
Type |
Name |
Description |
Int32 |
geomIndex |
A geometry index, 0 , or 1 .
|
Location |
onLoc |
A location value for On
|
Location |
leftLoc |
A location value for Left
|
Location |
rightLoc |
A location value for Right
|
Properties
|
Improve this Doc
View Source
GeometryCount
Declaration
public int GeometryCount { get; }
Property Value
Methods
|
Improve this Doc
View Source
AllPositionsEqual(Int32, Location)
Declaration
public bool AllPositionsEqual(int geomIndex, Location loc)
Parameters
Returns
|
Improve this Doc
View Source
Flip()
Declaration
|
Improve this Doc
View Source
GetLocation(Int32)
Declaration
public Location GetLocation(int geomIndex)
Parameters
Type |
Name |
Description |
Int32 |
geomIndex |
|
Returns
|
Improve this Doc
View Source
GetLocation(Int32, Position)
Declaration
public Location GetLocation(int geomIndex, Position posIndex)
Parameters
Returns
|
Improve this Doc
View Source
GetLocation(Int32, Positions)
Declaration
[Obsolete("Use GetLocation(int, Topology.Location)")]
public Location GetLocation(int geomIndex, Positions posIndex)
Parameters
Returns
|
Improve this Doc
View Source
IsAnyNull(Int32)
Declaration
public bool IsAnyNull(int geomIndex)
Parameters
Type |
Name |
Description |
Int32 |
geomIndex |
|
Returns
|
Improve this Doc
View Source
IsArea()
Declaration
Returns
|
Improve this Doc
View Source
IsArea(Int32)
Declaration
public bool IsArea(int geomIndex)
Parameters
Type |
Name |
Description |
Int32 |
geomIndex |
|
Returns
|
Improve this Doc
View Source
IsEqualOnSide(Label, Int32)
Declaration
public bool IsEqualOnSide(Label lbl, int side)
Parameters
Returns
|
Improve this Doc
View Source
IsLine(Int32)
Declaration
public bool IsLine(int geomIndex)
Parameters
Type |
Name |
Description |
Int32 |
geomIndex |
|
Returns
|
Improve this Doc
View Source
IsNull(Int32)
Declaration
public bool IsNull(int geomIndex)
Parameters
Type |
Name |
Description |
Int32 |
geomIndex |
|
Returns
|
Improve this Doc
View Source
Merge(Label)
Merge this label with another one.
Merging updates any null attributes of this label with the attributes from lbl
.
Declaration
public void Merge(Label lbl)
Parameters
Type |
Name |
Description |
Label |
lbl |
The Label to merge
|
|
Improve this Doc
View Source
SetAllLocations(Int32, Location)
Declaration
public void SetAllLocations(int geomIndex, Location _location)
Parameters
|
Improve this Doc
View Source
SetAllLocationsIfNull(Location)
Declaration
public void SetAllLocationsIfNull(Location _location)
Parameters
Type |
Name |
Description |
Location |
_location |
|
|
Improve this Doc
View Source
SetAllLocationsIfNull(Int32, Location)
Declaration
public void SetAllLocationsIfNull(int geomIndex, Location _location)
Parameters
|
Improve this Doc
View Source
SetLocation(Int32, Location)
Declaration
public void SetLocation(int geomIndex, Location _location)
Parameters
|
Improve this Doc
View Source
SetLocation(Int32, Position, Location)
Declaration
public void SetLocation(int geomIndex, Position posIndex, Location _location)
Parameters
|
Improve this Doc
View Source
SetLocation(Int32, Positions, Location)
Declaration
[Obsolete("Use SetLocation(int, Geometries.Position, Location)")]
public void SetLocation(int geomIndex, Positions posIndex, Location _location)
Parameters
|
Improve this Doc
View Source
ToLine(Int32)
Converts one GeometryLocation to a Line location.
Declaration
public void ToLine(int geomIndex)
Parameters
Type |
Name |
Description |
Int32 |
geomIndex |
The index of the TopologyLocation to convert (0 or 1 )
|
|
Improve this Doc
View Source
ToLineLabel(Label)
Converts a Label to a Line label (that is, one with no side Location).
Declaration
public static Label ToLineLabel(Label label)
Parameters
Type |
Name |
Description |
Label |
label |
Label to convert.
|
Returns
Type |
Description |
Label |
Label as Line label.
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides