Search Results for

    Show / Hide Table of Contents

    Class PointLocation

    Functions for locating points within basic geometric structures such as lines and rings.

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

    Methods

    | Edit this page View Source

    IsInRing(Coordinate, CoordinateSequence)

    Tests whether a point lies inside or on a ring. The ring may be oriented in either direction. A point lying exactly on the ring boundary is considered to be inside the ring.

    This method does not first check the point against the envelope of the ring.
    Declaration
    public static bool IsInRing(Coordinate p, CoordinateSequence ring)
    Parameters
    Type Name Description
    Coordinate p

    The point to check for ring inclusion

    CoordinateSequence ring

    A CoordinateSequence representing the ring (which must have first point identical to last point)

    Returns
    Type Description
    bool

    true if p is inside ring

    | Edit this page View Source

    IsInRing(Coordinate, Coordinate[])

    Tests whether a point lies inside or on a ring. The ring may be oriented in either direction. A point lying exactly on the ring boundary is considered to be inside the ring.

    This method does not first check the point against the envelope of the ring.
    Declaration
    public static bool IsInRing(Coordinate p, Coordinate[] ring)
    Parameters
    Type Name Description
    Coordinate p

    The point to check for ring inclusion

    Coordinate[] ring

    An array of coordinates representing the ring (which must have first point identical to last point)

    Returns
    Type Description
    bool

    true if p is inside ring

    See Also
    LocateInRing(Coordinate, Coordinate[])
    | Edit this page View Source

    IsOnLine(Coordinate, CoordinateSequence)

    Tests whether a point lies on the line defined by a list of coordinates.

    Declaration
    public static bool IsOnLine(Coordinate p, CoordinateSequence line)
    Parameters
    Type Name Description
    Coordinate p

    The point to test

    CoordinateSequence line

    The line coordinates

    Returns
    Type Description
    bool

    true if the point is a vertex of the line or lies in the interior of a line segment in the line

    | Edit this page View Source

    IsOnLine(Coordinate, Coordinate[])

    Tests whether a point lies on the line defined by a list of coordinates.

    Declaration
    public static bool IsOnLine(Coordinate p, Coordinate[] line)
    Parameters
    Type Name Description
    Coordinate p

    The point to test

    Coordinate[] line

    The line coordinates

    Returns
    Type Description
    bool

    true if the point is a vertex of the line or lies in the interior of a line segment in the line

    | Edit this page View Source

    IsOnSegment(Coordinate, Coordinate, Coordinate)

    Tests whether a point lies on a line segment.

    Declaration
    public static bool IsOnSegment(Coordinate p, Coordinate p0, Coordinate p1)
    Parameters
    Type Name Description
    Coordinate p

    The point to test

    Coordinate p0

    A point of the line segment

    Coordinate p1

    A point of the line segment

    Returns
    Type Description
    bool

    true if the point lies on the line segment

    | Edit this page View Source

    LocateInRing(Coordinate, CoordinateSequence)

    Determines whether a point lies in the interior, on the boundary, or in the exterior of a ring.The ring may be oriented in either direction.

    This method does not first check the point against the envelope of the ring.
    Declaration
    public static Location LocateInRing(Coordinate p, CoordinateSequence ring)
    Parameters
    Type Name Description
    Coordinate p

    The point to check for ring inclusion

    CoordinateSequence ring

    A CoordinateSequence representing the ring (which must have first point identical to last point)

    Returns
    Type Description
    Location
    | Edit this page View Source

    LocateInRing(Coordinate, Coordinate[])

    Determines whether a point lies in the interior, on the boundary, or in the exterior of a ring.The ring may be oriented in either direction.

    This method does not first check the point against the envelope of the ring.
    Declaration
    public static Location LocateInRing(Coordinate p, Coordinate[] ring)
    Parameters
    Type Name Description
    Coordinate p

    The point to check for ring inclusion

    Coordinate[] ring

    A CoordinateSequence representing the ring (which must have first point identical to last point)

    Returns
    Type Description
    Location

    the Location of p relative to the ring

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