Search Results for

    Show / Hide Table of Contents

    Class PolygonHoleJoiner

    Transforms a polygon with holes into a single self-touching (invalid) ring by joining holes to the exterior shell or to another hole with out-and-back line segments. The holes are added in order of their envelopes (leftmost/lowest first). As the result shell develops, a hole may be added to what was originally another hole.

    There is no attempt to optimize the quality of the join lines. In particular, holes may be joined by lines longer than is optimal. However, holes which touch the shell or other holes are joined at the touch point.

    The class does not require the input polygon to have normal orientation (shell CW and rings CCW). The output ring is always CW.
    Inheritance
    object
    PolygonHoleJoiner
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Triangulate.Polygon
    Assembly: NetTopologySuite.dll
    Syntax
    public class PolygonHoleJoiner

    Constructors

    | Edit this page View Source

    PolygonHoleJoiner(Polygon)

    Creates a new hole joiner.

    Declaration
    public PolygonHoleJoiner(Polygon polygon)
    Parameters
    Type Name Description
    Polygon polygon

    The polygon to join

    Methods

    | Edit this page View Source

    Compute()

    Computes the joined ring

    Declaration
    public Coordinate[] Compute()
    Returns
    Type Description
    Coordinate[]

    The points in the joined ring

    | Edit this page View Source

    Join(Polygon)

    Joins the shell and holes of a polygon and returns the result as sequence of Coordinates.

    Declaration
    public static Coordinate[] Join(Polygon polygon)
    Parameters
    Type Name Description
    Polygon polygon

    The polygon to join

    Returns
    Type Description
    Coordinate[]

    The result coordinates

    | Edit this page View Source

    JoinAsPolygon(Polygon)

    Joins the shell and holes of a polygon and returns the result as an (invalid) Polygon.

    Declaration
    public static Polygon JoinAsPolygon(Polygon polygon)
    Parameters
    Type Name Description
    Polygon polygon

    The polygon to join

    Returns
    Type Description
    Polygon

    The result polygon

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