Search Results for

    Show / Hide Table of Contents

    Class MaximumInscribedCircle

    Constructs the Maximum Inscribed Circle for a polygonal Geometry, up to a specified tolerance. The Maximum Inscribed Circle is determined by a point in the interior of the area which has the farthest distance from the area boundary, along with a boundary point at that distance.

    In the context of geography the center of the Maximum Inscribed Circle is known as the Pole of Inaccessibility. A cartographic use case is to determine a suitable point to place a map label within a polygon.

    The radius length of the Maximum Inscribed Circle is a measure of how "narrow" a polygon is. It is the distance at which the negative buffer becomes empty.

    The class supports polygons with holes and multipolygons.

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

    Future Enhancements

    • Support a polygonal constraint on placement of center
    Inheritance
    object
    MaximumInscribedCircle
    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 MaximumInscribedCircle

    Constructors

    | Edit this page View Source

    MaximumInscribedCircle(Geometry, double)

    Creates a new instance of a Maximum Inscribed Circle computation.

    Declaration
    public MaximumInscribedCircle(Geometry polygonal, double tolerance)
    Parameters
    Type Name Description
    Geometry polygonal

    An areal geometry

    double tolerance

    The distance tolerance for computing the centre point (must be positive)

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if the tolerance is non-positive

    ArgumentException

    Thrown if the input geometry is non-polygonal or empty

    Methods

    | Edit this page View Source

    GetCenter()

    Gets the center point of the maximum inscribed circle (up to the tolerance distance).

    Declaration
    public Point GetCenter()
    Returns
    Type Description
    Point

    The center point of the maximum inscribed circle

    | Edit this page View Source

    GetCenter(Geometry, double)

    Computes the center point of the Maximum Inscribed Circle of a polygonal geometry, up to a given tolerance distance.

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

    A polygonal geometry

    double tolerance

    The distance tolerance for computing the center point

    Returns
    Type Description
    Point

    The center point of the maximum inscribed 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, double)

    Computes a radius line of the Maximum Inscribed Circle of a polygonal geometry, up to a given tolerance distance.

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

    A polygonal geometry

    double tolerance

    The distance tolerance for computing the center point

    Returns
    Type Description
    LineString

    A line from the center to a point on the circle

    | Edit this page View Source

    GetRadiusPoint()

    Gets a point defining the radius of the Maximum Inscribed Circle. This is a point on the boundary which is nearest to the computed center of the Maximum Inscribed 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 Maximum Inscribed Circle

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