public class LargestEmptyCircles extends Object
LargestEmptyCircle
, allowing for repeated calls to find the N largest empty
circles in an optimised manner.
In this adaptation circle circumferences are constrained to lie within the boundary (originally only circle center points must lie within the boundary). This adaption also supports polygonal obstacles; if a boundary is provided, circles will not lie within the polygonal obstacles.
Constructor and Description |
---|
LargestEmptyCircles(org.locationtech.jts.geom.Geometry obstacles,
org.locationtech.jts.geom.Geometry boundary,
double tolerance)
Constructs a new Largest Empty Circles (LEC) instance, ensuring that the
circles are interior-disjoint to a set of obstacle geometries and (optional)
contained within a polygonal boundary.
|
Modifier and Type | Method and Description |
---|---|
double[][] |
findLECs(int n)
Computes the (next) N largest empty circles.
|
double[] |
findNextLEC()
Computes the next largest empty circle.
|
public LargestEmptyCircles(org.locationtech.jts.geom.Geometry obstacles, org.locationtech.jts.geom.Geometry boundary, double tolerance)
obstacles
- geometry representing the obstacles; if null, the boundary
is used insteadboundary
- a polygonal geometry (may be null)tolerance
- a positive distance tolerance for computing the circle
center pointIllegalArgumentException
- if the obstacles geometry or the tolerance
is non-positivepublic double[][] findLECs(int n)
n
- number of circlespublic double[] findNextLEC()
Copyright © 2023. All rights reserved.