Search Results for

    Show / Hide Table of Contents

    Class NodedSegmentString

    Represents a list of contiguous line segments, and supports noding the segments. The line segments are represented by an array of Coordinates. Intended to optimize the noding of contiguous segments by reducing the number of allocated objects. ISegmentStrings can carry a context object, which is useful for preserving topological or parentage information. All noded substrings are initialized with the same context object.

    For read-only applications use BasicSegmentString, which is (slightly)more lightweight.
    Inheritance
    object
    NodedSegmentString
    Implements
    INodableSegmentString
    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 NodedSegmentString : INodableSegmentString, ISegmentString

    Constructors

    | Edit this page View Source

    NodedSegmentString(Coordinate[], object)

    Creates an instance from a list of vertices and optional data object.

    Declaration
    public NodedSegmentString(Coordinate[] pts, object context)
    Parameters
    Type Name Description
    Coordinate[] pts

    The vertices of the segment string.

    object context

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

    | Edit this page View Source

    NodedSegmentString(ISegmentString)

    Creates a new instance from a ISegmentString.

    Declaration
    public NodedSegmentString(ISegmentString ss)
    Parameters
    Type Name Description
    ISegmentString ss

    The segment string to use.

    Properties

    | Edit this page View Source

    Context

    Gets/Sets the user-defined data for this segment string.

    Declaration
    public object Context { get; set; }
    Property Value
    Type Description
    object
    Remarks

    In JTS this property is called Data

    | Edit this page View Source

    Coordinates

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

    Count

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

    HasNodes

    Gets a value indicating if any nodes have been added.

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

    IsClosed

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

    NodeList

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

    NodedCoordinates

    Gets a list of coordinates with all nodes included.

    Declaration
    public Coordinate[] NodedCoordinates { get; }
    Property Value
    Type Description
    Coordinate[]

    An array of coordinates including nodes

    Methods

    | Edit this page View Source

    AddIntersection(LineIntersector, int, int, int)

    Add an SegmentNode for intersection intIndex. An intersection that falls exactly on a vertex of the NodedSegmentString is normalized to use the higher of the two possible segmentIndexes.

    Declaration
    public void AddIntersection(LineIntersector li, int segmentIndex, int geomIndex, int intIndex)
    Parameters
    Type Name Description
    LineIntersector li
    int segmentIndex
    int geomIndex
    int intIndex
    | Edit this page View Source

    AddIntersection(Coordinate, int)

    Declaration
    public void AddIntersection(Coordinate intPt, int segmentIndex)
    Parameters
    Type Name Description
    Coordinate intPt
    int segmentIndex
    | Edit this page View Source

    AddIntersectionNode(Coordinate, int)

    Adds an intersection node for a given point and segment to this segment string. If an intersection already exists for this exact location, the existing node will be returned.

    Declaration
    public SegmentNode AddIntersectionNode(Coordinate intPt, int segmentIndex)
    Parameters
    Type Name Description
    Coordinate intPt

    The location of the intersection

    int segmentIndex

    The index of the segment containing the intersection

    Returns
    Type Description
    SegmentNode

    the intersection node for the point

    | Edit this page View Source

    AddIntersections(LineIntersector, int, int)

    Adds EdgeIntersections for one or both intersections found for a segment of an edge to the edge intersection list.

    Declaration
    public void AddIntersections(LineIntersector li, int segmentIndex, int geomIndex)
    Parameters
    Type Name Description
    LineIntersector li
    int segmentIndex
    int geomIndex
    | Edit this page View Source

    GetCoordinate(int)

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

    GetNodedSubstrings(IEnumerable<ISegmentString>)

    Gets the ISegmentStrings which result from splitting this string at node points.

    Declaration
    public static ReadOnlyCollection<ISegmentString> GetNodedSubstrings(IEnumerable<ISegmentString> segStrings)
    Parameters
    Type Name Description
    IEnumerable<ISegmentString> segStrings

    A collection of NodedSegmentStrings

    Returns
    Type Description
    ReadOnlyCollection<ISegmentString>

    A collection of NodedSegmentStrings representing the substrings

    | Edit this page View Source

    GetNodedSubstrings(IEnumerable<ISegmentString>, ICollection<ISegmentString>)

    Adds the noded ISegmentStrings which result from splitting this string at node points.

    Declaration
    public static void GetNodedSubstrings(IEnumerable<ISegmentString> segStrings, ICollection<ISegmentString> resultEdgelist)
    Parameters
    Type Name Description
    IEnumerable<ISegmentString> segStrings

    A collection of NodedSegmentStrings

    ICollection<ISegmentString> resultEdgelist

    A list which will collect the NodedSegmentStrings representing the substrings

    | 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

    The 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

    INodableSegmentString
    ISegmentString

    Extension Methods

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

    See Also

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