Search Results for

    Show / Hide Table of Contents

    Class PolygonHullSimplifier

    Computes topology-preserving simplified hulls of polygonal geometry. Both outer and inner hulls can be computed. Outer hulls contain the input geometry and are larger in area. Inner hulls are contained by the input geometry and are smaller in area. In both the hull vertices are a subset of the input vertices. The hull construction attempts to minimize the area difference with the input geometry.

    Hulls are generally concave if the input is. Computed hulls are topology-preserving: they do not contain any self-intersections or overlaps, so the result polygonal geometry is valid.

    Polygons with holes and MultiPolygons are supported. The result has the same geometric type and structure as the input.

    The number of vertices in the computed hull is determined by a target parameter. Two parameters are supported:
    • Vertex Number fractionthe fraction of the input vertices retained in the result. Value 1 produces the original geometry. Smaller values produce less concave results. For outer hulls, value 0 produces the convex hull (with triangles for any holes). For inner hulls, value 0 produces a triangle (if no holes are present).
    • Area Delta ratio the ratio of the change in area to the input area.Value 0 produces the original geometry. Larger values produce less concave results.
    The algorithm ensures that the result does not cause the target parameter to be exceeded. This allows computing outer or inner hulls with a small area delta ratio as an effective way of removing narrow gores and spikes.
    Inheritance
    object
    PolygonHullSimplifier
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Simplify
    Assembly: NetTopologySuite.dll
    Syntax
    public class PolygonHullSimplifier

    Constructors

    | Edit this page View Source

    PolygonHullSimplifier(Geometry, bool)

    Creates a new instance to compute a simplified hull of a polygonal geometry. An outer or inner hull is computed depending on the value of isOuter.

    Declaration
    public PolygonHullSimplifier(Geometry inputGeom, bool isOuter)
    Parameters
    Type Name Description
    Geometry inputGeom

    The polygonal geometry to process

    bool isOuter

    Indicates whether to compute an outer or inner hull

    Properties

    | Edit this page View Source

    AreaDeltaRatio

    Gets or sets a value indicating the target maximum ratio of the change in area of the result to the input area. The value must be 0 or greater.

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

    VertexNumFraction

    Gets or sets a value indicating the target fraction of input vertices which are retained in the result. The value should be in the range [0,1].

    Declaration
    public double VertexNumFraction { get; set; }
    Property Value
    Type Description
    double

    Methods

    | Edit this page View Source

    GetResult()

    Gets the result polygonal hull geometry.

    Declaration
    public Geometry GetResult()
    Returns
    Type Description
    Geometry

    The polygonal geometry for the hull

    | Edit this page View Source

    Hull(Geometry, bool, double)

    Computes topology-preserving simplified hull of a polygonal geometry, with hull shape determined by a target parameter specifying the fraction of the input vertices retained in the result. Larger values compute less concave results. A value of 1 produces the convex hull; a value of 0 produces the original geometry. Either outer or inner hulls can be computed.

    Declaration
    public static Geometry Hull(Geometry geom, bool isOuter, double vertexNumFraction)
    Parameters
    Type Name Description
    Geometry geom

    The polygonal geometry to process

    bool isOuter

    A flag indicating whether to compute an outer or inner hull

    double vertexNumFraction

    The target fraction of number of input vertices in result

    Returns
    Type Description
    Geometry

    The hull geometry

    | Edit this page View Source

    HullByAreaDelta(Geometry, bool, double)

    Computes a boundary-respecting hull of a polygonal geometry, with hull shape determined by a target parameter specifying the ratio of maximum difference in area to original area. Larger values compute less concave results. A value of 0 produces the original geometry. Either outer or inner hulls can be computed.

    Declaration
    public static Geometry HullByAreaDelta(Geometry geom, bool isOuter, double areaDeltaRatio)
    Parameters
    Type Name Description
    Geometry geom

    The polygonal geometry to process

    bool isOuter

    A flag indicating whether to compute an outer or inner hull

    double areaDeltaRatio

    The target ratio of area difference to original area

    Returns
    Type Description
    Geometry

    The hull geometry

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