Search Results for

    Show / Hide Table of Contents

    Class LinearIterator

    An iterator over the components and coordinates of a linear geometry (LineStrings and MultiLineStrings.

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

    Constructors

    | Edit this page View Source

    LinearIterator(Geometry)

    Creates an iterator initialized to the start of a linear Geometry.

    Declaration
    public LinearIterator(Geometry linearGeom)
    Parameters
    Type Name Description
    Geometry linearGeom

    The linear geometry to iterate over.

    Exceptions
    Type Condition
    ArgumentException

    if linearGeom is not ILineal

    | Edit this page View Source

    LinearIterator(Geometry, LinearLocation)

    Creates an iterator starting at a LinearLocation on a linear Geometry.

    Declaration
    public LinearIterator(Geometry linearGeom, LinearLocation start)
    Parameters
    Type Name Description
    Geometry linearGeom

    The linear geometry to iterate over.

    LinearLocation start

    The location to start at.

    Exceptions
    Type Condition
    ArgumentException

    if linearGeom is not ILineal

    | Edit this page View Source

    LinearIterator(Geometry, int, int)

    Creates an iterator starting at a component and vertex in a linear Geometry.

    Declaration
    public LinearIterator(Geometry linearGeom, int componentIndex, int vertexIndex)
    Parameters
    Type Name Description
    Geometry linearGeom

    The linear geometry to iterate over.

    int componentIndex

    The component to start at.

    int vertexIndex

    The vertex to start at.

    Exceptions
    Type Condition
    ArgumentException

    if linearGeom is not ILineal

    Properties

    | Edit this page View Source

    ComponentIndex

    The component index of the vertex the iterator is currently at.

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

    IsEndOfLine

    Checks whether the iterator cursor is pointing to the endpoint of a component LineString.

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

    Line

    Gets the LineString component the iterator is current at.

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

    SegmentEnd

    Gets the second Coordinate of the current segment (the coordinate of the next vertex). If the iterator is at the end of a line, null is returned.

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

    SegmentStart

    Gets the first Coordinate of the current segment (the coordinate of the current vertex).

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

    VertexIndex

    The vertex index of the vertex the iterator is currently at.

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

    Methods

    | Edit this page View Source

    HasNext()

    Tests whether there are any vertices left to iterator over. Specifically, HasNext() returns true if the current state of the iterator represents a valid location on the linear geometry.

    Declaration
    public bool HasNext()
    Returns
    Type Description
    bool

    true if there are more vertices to scan.

    | Edit this page View Source

    Next()

    Jump to the next element of the iteration.

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

    SegmentEndVertexIndex(LinearLocation)

    Declaration
    public static int SegmentEndVertexIndex(LinearLocation loc)
    Parameters
    Type Name Description
    LinearLocation loc
    Returns
    Type Description
    int
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX