public class LargestEmptyCircle extends Object
The Largest Empty Circle is the largest circle which has its center in the convex hull of the obstacles (the boundary), and whose interior does not intersect with any obstacle. The circle center is the point in the interior of the boundary which has the farthest distance from the obstacles (up to tolerance). The circle is determined by the center point and a point lying on an obstacle indicating the circle radius.
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.
MaximumInscribedCircle
,
InteriorPoint
,
Centroid
Constructor and Description |
---|
LargestEmptyCircle(Geometry obstacles,
double tolerance)
Creates a new instance of a Largest Empty Circle construction.
|
Modifier and Type | Method and Description |
---|---|
Point |
getCenter()
Gets the center point of the Largest Empty Circle
(up to the tolerance distance).
|
static Point |
getCenter(Geometry obstacles,
double tolerance)
Computes the center point of the Largest Empty Circle
within a set of obstacles, up to a given tolerance distance.
|
LineString |
getRadiusLine()
Gets a line representing a radius of the Largest Empty Circle.
|
static LineString |
getRadiusLine(Geometry obstacles,
double tolerance)
Computes a radius line of the Largest Empty Circle
within a set of obstacles, up to a given distance tolerance.
|
Point |
getRadiusPoint()
Gets a point defining the radius of the Largest Empty Circle.
|
public LargestEmptyCircle(Geometry obstacles, double tolerance)
obstacles
- a geometry representing the obstacles (points and lines)tolerance
- the distance tolerance for computing the circle center pointpublic static Point getCenter(Geometry obstacles, double tolerance)
obstacles
- a geometry representing the obstacles (points and lines)tolerance
- the distance tolerance for computing the center pointpublic static LineString getRadiusLine(Geometry obstacles, double tolerance)
obstacles
- a geometry representing the obstacles (points and lines)tolerance
- the distance tolerance for computing the center pointpublic Point getCenter()
public Point getRadiusPoint()
public LineString getRadiusLine()
Copyright © 2022. All rights reserved.