Search Results for

    Show / Hide Table of Contents

    Class BasicSegmentString

    Represents a read-only list of contiguous line segments. This can be used for detection of intersections or nodes. ISegmentStrings can carry a context object, which is useful for preserving topological or parentage information.

    If adding nodes is required use NodedSegmentString.
    Inheritance
    object
    BasicSegmentString
    Implements
    ISegmentString
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: NetTopologySuite.Noding
    Assembly: NetTopologySuite.dll
    Syntax
    public class BasicSegmentString : ISegmentString

    Constructors

    | Edit this page View Source

    BasicSegmentString(Coordinate[], object)

    Creates a new segment string from a list of vertices.

    Declaration
    public BasicSegmentString(Coordinate[] pts, object data)
    Parameters
    Type Name Description
    Coordinate[] pts

    the vertices of the segment string

    object data

    the user-defined data of this segment string (may be null)

    Properties

    | Edit this page View Source

    Context

    Gets the user-defined data for this segment string.

    Declaration
    public object Context { get; set; }
    Property Value
    Type Description
    object
    | Edit this page View Source

    Coordinates

    Points that make up ISegmentString

    Declaration
    public Coordinate[] Coordinates { get; }
    Property Value
    Type Description
    Coordinate[]
    | Edit this page View Source

    Count

    Gets the number of Coordinates in this segment string.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    IsClosed

    States whether ISegmentString is closed

    Declaration
    public bool IsClosed { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    this[int]

    Declaration
    public LineSegment this[int index] { get; set; }
    Parameters
    Type Name Description
    int index
    Property Value
    Type Description
    LineSegment

    Methods

    | Edit this page View Source

    GetCoordinate(int)

    Declaration
    public Coordinate GetCoordinate(int idx)
    Parameters
    Type Name Description
    int idx
    Returns
    Type Description
    Coordinate
    | Edit this page View Source

    GetSegmentOctant(int)

    Gets the octant of the segment starting at vertex index

    Declaration
    public Octants GetSegmentOctant(int index)
    Parameters
    Type Name Description
    int index

    the index of the vertex starting the segment. Must not be the last index in the vertex list

    Returns
    Type Description
    Octants

    octant of the segment at the vertex

    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    ISegmentString

    Extension Methods

    SegmentStringEx.GetCoordinate(ISegmentString, int)
    SegmentStringEx.NextInRing(ISegmentString, int)
    SegmentStringEx.PrevInRing(ISegmentString, int)

    See Also

    NodedSegmentString
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX