Search Results for

    Show / Hide Table of Contents

    Class RingClipper

    Clips a ring of points to an rectangle. Uses a variant of Cohen-Sutherland clipping.

    In general the output is not topologically valid. In particular, the output may contain coincident non-noded line segments along the clip rectangle sides. However, the output is sufficiently well-structured that it can be used as input to the OverlayNG algorithm (which is able to process coincident linework due to the need to handle topology collapse under precision reduction).

    Because of the likelihood of creating extraneous line segments along the clipping rectangle sides, this class is not suitable for clipping linestrings.

    The clipping envelope should be generated using NetTopologySuite.Operation.OverlayNG.RobustClipEnvelopeComputer, to ensure that intersecting line segments are not perturbed by clipping. This is required to ensure that the overlay of the clipped geometry is robust and correct (i.e. the same as if clipping was not used).
    Inheritance
    object
    RingClipper
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Operation.OverlayNG
    Assembly: NetTopologySuite.dll
    Syntax
    public sealed class RingClipper

    Constructors

    | Edit this page View Source

    RingClipper(Envelope)

    Creates a new clipper for the given envelope.

    Declaration
    public RingClipper(Envelope clipEnv)
    Parameters
    Type Name Description
    Envelope clipEnv

    The clipping envelope

    Methods

    | Edit this page View Source

    Clip(Coordinate[])

    Clips a list of points to the clipping rectangle box.

    Declaration
    public Coordinate[] Clip(Coordinate[] pts)
    Parameters
    Type Name Description
    Coordinate[] pts

    The points of the ring

    Returns
    Type Description
    Coordinate[]

    The points of the clipped ring

    See Also

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