Search Results for

    Show / Hide Table of Contents

    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 Geometrys, 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 Geometrys. 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 TopologyLocations with specific geometries.

    Inheritance
    object
    Label
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: NetTopologySuite.GeometriesGraph
    Assembly: NetTopologySuite.dll
    Syntax
    public class Label

    Constructors

    | Edit this page 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

    | Edit this page 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

    | Edit this page View Source

    Label(Label)

    Construct a Label with the same values as the argument Label.

    Declaration
    public Label(Label lbl)
    Parameters
    Type Name Description
    Label lbl

    A Label

    | Edit this page View Source

    Label(int, 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
    int geomIndex

    A geometry index, 0, or 1.

    Location onLoc

    A location value for On

    | Edit this page View Source

    Label(int, 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
    int 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

    | Edit this page View Source

    GeometryCount

    Declaration
    public int GeometryCount { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    AllPositionsEqual(int, Location)

    Declaration
    public bool AllPositionsEqual(int geomIndex, Location loc)
    Parameters
    Type Name Description
    int geomIndex
    Location loc
    Returns
    Type Description
    bool
    | Edit this page View Source

    Flip()

    Performs Flip() on both TopologyLocations of this Label

    Declaration
    public void Flip()
    | Edit this page View Source

    GetLocation(int)

    Declaration
    public Location GetLocation(int geomIndex)
    Parameters
    Type Name Description
    int geomIndex
    Returns
    Type Description
    Location
    | Edit this page View Source

    GetLocation(int, Position)

    Declaration
    public Location GetLocation(int geomIndex, Position posIndex)
    Parameters
    Type Name Description
    int geomIndex
    Position posIndex
    Returns
    Type Description
    Location
    | Edit this page View Source

    GetLocation(int, Positions)

    Declaration
    [Obsolete("Use GetLocation(int, Topology.Location)")]
    public Location GetLocation(int geomIndex, Positions posIndex)
    Parameters
    Type Name Description
    int geomIndex
    Positions posIndex
    Returns
    Type Description
    Location
    | Edit this page View Source

    IsAnyNull(int)

    Declaration
    public bool IsAnyNull(int geomIndex)
    Parameters
    Type Name Description
    int geomIndex
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsArea()

    Declaration
    public bool IsArea()
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsArea(int)

    Declaration
    public bool IsArea(int geomIndex)
    Parameters
    Type Name Description
    int geomIndex
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsEqualOnSide(Label, int)

    Declaration
    public bool IsEqualOnSide(Label lbl, int side)
    Parameters
    Type Name Description
    Label lbl
    int side
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsLine(int)

    Declaration
    public bool IsLine(int geomIndex)
    Parameters
    Type Name Description
    int geomIndex
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsNull(int)

    Declaration
    public bool IsNull(int geomIndex)
    Parameters
    Type Name Description
    int geomIndex
    Returns
    Type Description
    bool
    | Edit this page 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

    | Edit this page View Source

    SetAllLocations(int, Location)

    Declaration
    public void SetAllLocations(int geomIndex, Location _location)
    Parameters
    Type Name Description
    int geomIndex
    Location _location
    | Edit this page View Source

    SetAllLocationsIfNull(Location)

    Declaration
    public void SetAllLocationsIfNull(Location _location)
    Parameters
    Type Name Description
    Location _location
    | Edit this page View Source

    SetAllLocationsIfNull(int, Location)

    Declaration
    public void SetAllLocationsIfNull(int geomIndex, Location _location)
    Parameters
    Type Name Description
    int geomIndex
    Location _location
    | Edit this page View Source

    SetLocation(int, Location)

    Declaration
    public void SetLocation(int geomIndex, Location _location)
    Parameters
    Type Name Description
    int geomIndex
    Location _location
    | Edit this page View Source

    SetLocation(int, Position, Location)

    Declaration
    public void SetLocation(int geomIndex, Position posIndex, Location _location)
    Parameters
    Type Name Description
    int geomIndex
    Position posIndex
    Location _location
    | Edit this page View Source

    SetLocation(int, Positions, Location)

    Declaration
    [Obsolete("Use SetLocation(int, Geometries.Position, Location)")]
    public void SetLocation(int geomIndex, Positions posIndex, Location _location)
    Parameters
    Type Name Description
    int geomIndex
    Positions posIndex
    Location _location
    | Edit this page View Source

    ToLine(int)

    Converts one GeometryLocation to a Line location.

    Declaration
    public void ToLine(int geomIndex)
    Parameters
    Type Name Description
    int geomIndex

    The index of the TopologyLocation to convert (0 or 1)

    | Edit this page 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.

    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX