Search Results for

    Show / Hide Table of Contents

    Class LargestEmptyCircle

    Constructs the Largest Empty Circle for a set of obstacle geometries, up to a given accuracy distance tolerance. The obstacles may be any combination of point, linear and polygonal geometries.

    The Largest Empty Circle (LEC) is the largest circle whose interior does not intersect with any obstacle and whose center lies within a polygonal boundary. The circle center is the point in the interior of the boundary which has the farthest distance from the obstacles (up to the accuracy of the distance tolerance). The circle itself is determined by the center point and a point lying on an obstacle determining the circle radius.

    The polygonal boundary may be supplied explicitly. If it is not specified the convex hull of the obstacles is used as the boundary.

    To compute an LEC which lies wholly within a polygonal boundary, include the boundary of the polygon(s) as a linear obstacle.

    The implementation uses a successive-approximation technique over a grid of square cells covering the obstacles and boundary. The grid is refined using a branch-and-bound algorithm. Point containment and distance are computed in a performant way by using spatial indexes.

    Inheritance
    object
    LargestEmptyCircle
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Algorithm.Construct
    Assembly: NetTopologySuite.dll
    Syntax
    public class LargestEmptyCircle

    Constructors

    | Edit this page View Source

    LargestEmptyCircle(Geometry, Geometry, double)

    Creates a new instance of a Largest Empty Circle construction, interior-disjoint to a set of obstacle geometries and having its center within a polygonal boundary. The obstacles may be any collection of points, lines and polygons. If the boundary is null or empty the convex hull of the obstacles is used as the boundary.

    Declaration
    public LargestEmptyCircle(Geometry obstacles, Geometry boundary, double tolerance)
    Parameters
    Type Name Description
    Geometry obstacles

    A non-empty geometry representing the obstacles (points and lines)

    Geometry boundary

    A polygonal geometry to contain the LEC center (may be null or empty)

    double tolerance

    The distance tolerance for computing the center point (a positive value)

    | Edit this page View Source

    LargestEmptyCircle(Geometry, double)

    Creates a new instance of a Largest Empty Circle construction.

    Declaration
    [Obsolete("Will be removed in a future version")]
    public LargestEmptyCircle(Geometry obstacles, double tolerance)
    Parameters
    Type Name Description
    Geometry obstacles

    A geometry representing the obstacles (points and lines)

    double tolerance

    The distance tolerance for computing the center point

    Methods

    | Edit this page View Source

    GetCenter()

    Gets the center point of the Largest Empty Circle (up to the tolerance distance).

    Declaration
    public Point GetCenter()
    Returns
    Type Description
    Point

    The center point of the Largest Empty Circle

    | Edit this page View Source

    GetCenter(Geometry, Geometry, double)

    Computes the center point of the Largest Empty Circle interior-disjoint to a set of obstacles and within a polygonal boundary, with accuracy to a given tolerance distance. The obstacles may be any collection of points, lines and polygons. The center of the LEC lies within the given boundary.

    Declaration
    public static Point GetCenter(Geometry obstacles, Geometry boundary, double tolerance)
    Parameters
    Type Name Description
    Geometry obstacles

    A geometry representing the obstacles

    Geometry boundary

    A polygonal geometry to contain the LEC center

    double tolerance

    The distance tolerance for computing the center point

    Returns
    Type Description
    Point

    The center point of the Largest Empty Circle

    | Edit this page View Source

    GetCenter(Geometry, double)

    Computes the center point of the Largest Empty Circle interior-disjoint to a set of obstacles, with accuracy to a given tolerance distance. The obstacles may be any collection of points, lines and polygons. The center of the LEC lies within the convex hull of the obstacles.

    Declaration
    public static Point GetCenter(Geometry obstacles, double tolerance)
    Parameters
    Type Name Description
    Geometry obstacles

    A geometry representing the obstacles

    double tolerance

    The distance tolerance for computing the center point

    Returns
    Type Description
    Point

    The center point of the Largest Empty Circle

    | Edit this page View Source

    GetRadiusLine()

    Gets a line representing a radius of the Largest Empty Circle.

    Declaration
    public LineString GetRadiusLine()
    Returns
    Type Description
    LineString

    A line from the center of the circle to a point on the edge

    | Edit this page View Source

    GetRadiusLine(Geometry, Geometry, double)

    Computes a radius line of the Largest Empty Circle interior-disjoint to a set of obstacles and within a polygonal boundary, with accuracy to a given tolerance distance. The obstacles may be any collection of points, lines and polygons. The center of the LEC lies within the given boundary.

    Declaration
    public static LineString GetRadiusLine(Geometry obstacles, Geometry boundary, double tolerance)
    Parameters
    Type Name Description
    Geometry obstacles

    A geometry representing the obstacles (points and lines)

    Geometry boundary

    A polygonal geometry to contain the LEC center

    double tolerance

    The distance tolerance for computing the center point

    Returns
    Type Description
    LineString

    A line from the center of the circle to a point on the edge

    | Edit this page View Source

    GetRadiusLine(Geometry, double)

    Computes a radius line of the Largest Empty Circle interior-disjoint to a set of obstacles, with accuracy to a given tolerance distance. The obstacles may be any collection of points, lines and polygons. The center of the LEC lies within the convex hull of the obstacles.

    Declaration
    public static LineString GetRadiusLine(Geometry obstacles, double tolerance)
    Parameters
    Type Name Description
    Geometry obstacles

    A geometry representing the obstacles (points and lines)

    double tolerance

    The distance tolerance for computing the center point

    Returns
    Type Description
    LineString

    A line from the center of the circle to a point on the edge

    | Edit this page View Source

    GetRadiusPoint()

    Gets a point defining the radius of the Largest Empty Circle. This is a point on the obstacles which is nearest to the computed center of the Largest Empty Circle. The line segment from the center to this point is a radius of the constructed circle, and this point lies on the boundary of the circle.

    Declaration
    public Point GetRadiusPoint()
    Returns
    Type Description
    Point

    A point defining the radius of the Largest Empty Circle

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