Search Results for

    Show / Hide Table of Contents

    Class ConcaveHullOfPolygons

    Constructs a concave hull of a set of polygons, respecting the polygons as constraints. A concave hull is a possibly non-convex polygon containing all the input polygons. A given set of polygons has a sequence of hulls of increasing concaveness, determined by a numeric target parameter. The computed hull "fills the gap" between the polygons, and does not intersect their interior.

    The concave hull is constructed by removing the longest outer edges of the Delaunay Triangulation of the space between the polygons, until the target criterion parameter is reached.

    The target criteria are:
    • Maximum Edge Lengththe length of the longest edge between the polygons is no larger than this value.
    • Maximum Edge Length Ratiodetermine the Maximum Edge Length as a fraction of the difference between the longest and shortest edge lengths between the polygons. This normalizes the Maximum Edge Length to be scale-free. A value of 1 produces the convex hull; a value of 0 produces the original polygons.
    The preferred criterion is the Maximum Edge Length Ratio, since it is scale-free and local (so that no assumption needs to be made about the total amount of concaveness present).

    Optionally the concave hull can be allowed to contain holes, via HolesAllowed.

    The hull can be specified as being "tight", which means it follows the outer boundaries of the input polygons.

    The input polygons must form a valid MultiPolygon (i.e.they must be non - overlapping).
    Inheritance
    object
    ConcaveHullOfPolygons
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Algorithm.Hull
    Assembly: NetTopologySuite.dll
    Syntax
    public class ConcaveHullOfPolygons

    Constructors

    | Edit this page View Source

    ConcaveHullOfPolygons(Geometry)

    Creates a new instance for a given geometry.

    Declaration
    public ConcaveHullOfPolygons(Geometry polygons)
    Parameters
    Type Name Description
    Geometry polygons

    The input geometry

    Properties

    | Edit this page View Source

    HolesAllowed

    Gets or sets a flag indicating whether holes are allowed in the concave hull polygon.

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

    MaximumEdgeLength

    Gets or sets the target maximum edge length for the concave hull. The length value must be zero or greater.

    • The value 0.0 produces the input polygons.
    • Larger values produce less concave results.
    • Above a certain large value the result is the convex hull of the input.

    The edge length ratio provides a scale-free parameter which is intended to produce similar concave results for a variety of inputs.
    Declaration
    public double MaximumEdgeLength { get; set; }
    Property Value
    Type Description
    double
    | Edit this page View Source

    MaximumEdgeLengthRatio

    Gets or sets the target maximum edge length ratio for the concave hull. The edge length ratio is a fraction of the difference between the longest and shortest edge lengths in the Delaunay Triangulation of the area between the input polygons. (Roughly speaking, it is a fraction of the difference between the shortest and longest distances between the input polygons.) It is a value in the range 0 to 1.

    • The value 0.0 produces the original input polygons.
    • The value 1.0 produces the convex hull.
    Declaration
    public double MaximumEdgeLengthRatio { get; set; }
    Property Value
    Type Description
    double
    | Edit this page View Source

    Tight

    Gets or sets a flag indicating whether the boundary of the hull polygon is kept tight to the outer edges of the input polygons.

    Declaration
    public bool Tight { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    ConcaveFillByLength(Geometry, double)

    Computes a concave fill area between a set of polygons, using the target criterion of maximum edge length.

    Declaration
    public static Geometry ConcaveFillByLength(Geometry polygons, double maxLength)
    Parameters
    Type Name Description
    Geometry polygons

    The input polygons

    double maxLength

    The target maximum edge length

    Returns
    Type Description
    Geometry

    The concave fill

    | Edit this page View Source

    ConcaveFillByLengthRatio(Geometry, double)

    Computes a concave fill area between a set of polygons, using the target criterion of maximum edge length ratio.

    Declaration
    public static Geometry ConcaveFillByLengthRatio(Geometry polygons, double lengthRatio)
    Parameters
    Type Name Description
    Geometry polygons

    The input polygons

    double lengthRatio

    The target maximum edge length ratio

    Returns
    Type Description
    Geometry

    The concave fill

    | Edit this page View Source

    ConcaveHullByLength(Geometry, double)

    Computes a concave hull of set of polygons using the target criterion of maximum edge length.

    Declaration
    public static Geometry ConcaveHullByLength(Geometry polygons, double maxLength)
    Parameters
    Type Name Description
    Geometry polygons

    The input polygons

    double maxLength

    The target maximum edge length

    Returns
    Type Description
    Geometry

    The concave hull

    | Edit this page View Source

    ConcaveHullByLength(Geometry, double, bool, bool)

    Computes a concave hull of set of polygons using the target criterion of maximum edge length, and allowing control over whether the hull boundary is tight and can contain holes.

    Declaration
    public static Geometry ConcaveHullByLength(Geometry polygons, double maxLength, bool isTight, bool isHolesAllowed)
    Parameters
    Type Name Description
    Geometry polygons

    The input polygons

    double maxLength

    The target maximum edge length

    bool isTight

    A flag indicating if the hull should be tight to the outside of the polygons

    bool isHolesAllowed

    A flag indicating if holes are allowed in the hull polygon

    Returns
    Type Description
    Geometry

    The concave hull

    | Edit this page View Source

    ConcaveHullByLengthRatio(Geometry, double)

    Computes a concave hull of set of polygons using the target criterion of maximum edge length ratio.

    Declaration
    public static Geometry ConcaveHullByLengthRatio(Geometry polygons, double lengthRatio)
    Parameters
    Type Name Description
    Geometry polygons

    The input polygons

    double lengthRatio

    The target maximum edge length ratio

    Returns
    Type Description
    Geometry
    | Edit this page View Source

    ConcaveHullByLengthRatio(Geometry, double, bool, bool)

    Computes a concave hull of set of polygons using the target criterion of maximum edge length ratio, and allowing control over whether the hull boundary is tight and can contain holes.

    Declaration
    public static Geometry ConcaveHullByLengthRatio(Geometry polygons, double lengthRatio, bool isTight, bool isHolesAllowed)
    Parameters
    Type Name Description
    Geometry polygons

    The input polygons

    double lengthRatio

    The target maximum edge length ratio

    bool isTight

    A flag indicating if the hull should be tight to the outside of the polygons

    bool isHolesAllowed

    A flag indicating if holes are allowed in the hull polygon

    Returns
    Type Description
    Geometry

    The concave hull

    | Edit this page View Source

    GetFill()

    Gets the concave fill, which is the area between the input polygons, subject to the concaveness control parameter.

    Declaration
    public Geometry GetFill()
    Returns
    Type Description
    Geometry

    The concave fill

    | Edit this page View Source

    GetHull()

    Gets the computed concave hull.

    Declaration
    public Geometry GetHull()
    Returns
    Type Description
    Geometry

    The concave hull

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