Search Results for

    Show / Hide Table of Contents

    Class LocationIndexOfPoint

    Computes the LinearLocation of the point on a linear Geometrynearest a given Coordinate. The nearest point is not necessarily unique; this class always computes the nearest point closest to the start of the geometry.

    Inheritance
    object
    LocationIndexOfPoint
    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 LocationIndexOfPoint

    Constructors

    | Edit this page View Source

    LocationIndexOfPoint(Geometry)

    Initializes a new instance of the LocationIndexOfPoint class.

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

    A linear geometry.

    Methods

    | Edit this page View Source

    IndexOf(Coordinate)

    Find the nearest location along a linear Geometry to a given point.

    Declaration
    public LinearLocation IndexOf(Coordinate inputPt)
    Parameters
    Type Name Description
    Coordinate inputPt

    The coordinate to locate.

    Returns
    Type Description
    LinearLocation

    The location of the nearest point.

    | Edit this page View Source

    IndexOf(Geometry, Coordinate)

    Declaration
    public static LinearLocation IndexOf(Geometry linearGeom, Coordinate inputPt)
    Parameters
    Type Name Description
    Geometry linearGeom
    Coordinate inputPt
    Returns
    Type Description
    LinearLocation
    | Edit this page View Source

    IndexOfAfter(Coordinate, LinearLocation)

    Find the nearest LinearLocation along the linear Geometry to a given Geometry after the specified minimum LinearLocation. If possible the location returned will be strictly greater than the minIndex. If this is not possible, the value returned will equal minIndex. (An example where this is not possible is when minIndex = [end of line] ).

    Declaration
    public LinearLocation IndexOfAfter(Coordinate inputPt, LinearLocation minIndex)
    Parameters
    Type Name Description
    Coordinate inputPt

    The coordinate to locate.

    LinearLocation minIndex

    The minimum location for the point location.

    Returns
    Type Description
    LinearLocation

    The location of the nearest point.

    | Edit this page View Source

    IndexOfAfter(Geometry, Coordinate, LinearLocation)

    Declaration
    public static LinearLocation IndexOfAfter(Geometry linearGeom, Coordinate inputPt, LinearLocation minIndex)
    Parameters
    Type Name Description
    Geometry linearGeom
    Coordinate inputPt
    LinearLocation minIndex
    Returns
    Type Description
    LinearLocation
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX