Search Results for

    Show / Hide Table of Contents

    Class ConvexHull

    Computes the convex hull of a Geometry. The convex hull is the smallest convex Geometry that contains all the points in the input Geometry.

    Uses the Graham Scan algorithm.

    Incorporates heuristics to optimize checking for degenerate results, and to reduce the number of points processed for large inputs.
    Inheritance
    object
    ConvexHull
    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 class ConvexHull

    Constructors

    | Edit this page View Source

    ConvexHull(Coordinate[], GeometryFactory)

    Create a new convex hull construction for the input Coordinate array.

    Declaration
    public ConvexHull(Coordinate[] pts, GeometryFactory geomFactory)
    Parameters
    Type Name Description
    Coordinate[] pts

    The coordinate array

    GeometryFactory geomFactory

    The factory to create the convex hull geometry

    | Edit this page View Source

    ConvexHull(Geometry)

    Create a new convex hull construction for the input Geometry.

    Declaration
    public ConvexHull(Geometry geometry)
    Parameters
    Type Name Description
    Geometry geometry
    | Edit this page View Source

    ConvexHull(IEnumerable<Coordinate>, GeometryFactory)

    Create a new convex hull construction for the input Coordinate array.

    Declaration
    public ConvexHull(IEnumerable<Coordinate> pts, GeometryFactory geomFactory)
    Parameters
    Type Name Description
    IEnumerable<Coordinate> pts
    GeometryFactory geomFactory

    The factory to create the convex hull geometry

    Methods

    | Edit this page View Source

    Create(IEnumerable<Geometry>)

    Computes the convex hull for the given sequence of Geometry instances.

    Declaration
    public static Geometry Create(IEnumerable<Geometry> geoms)
    Parameters
    Type Name Description
    IEnumerable<Geometry> geoms

    The Geometry instances whose convex hull to compute.

    Returns
    Type Description
    Geometry

    The convex hull of geoms.

    | Edit this page View Source

    GetConvexHull()

    Returns a Geometry that represents the convex hull of the input point. The point will contain the minimal number of points needed to represent the convex hull. In particular, no more than two consecutive points will be collinear.

    Declaration
    public Geometry GetConvexHull()
    Returns
    Type Description
    Geometry

    If the convex hull contains 3 or more points, a Polygon; 2 points, a LineString; 1 point, a Point; 0 points, an empty GeometryCollection.

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