/** * Create a minimum bounding circle for the input geometry. * The output is a polygon with a single closed circular segment containing curves. * Implements Welzl's algorithm using a greedy heuristic with expected O(n) time complexity. * * > [!WARNING] * > * > **Note** * > * > If curves are not needed, then [densify](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/densifyOperator/) the output geometry. * * @since 4.31 */ import type Polygon from "../Polygon.js"; import type { GeometryUnion } from "../types.js"; /** @since 5.2 */ export interface MinimumBoundingCircleOptions { /** * If `true`, the input geometries will be merged into a single geometry before * calculating the minimum bounding circle. * * @default false */ merge?: boolean; } /** * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [MinimumBoundingCircleOptions](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/minimumBoundingCircleOperator/#MinimumBoundingCircleOptions). */ export type Options = MinimumBoundingCircleOptions; /** * Performs the minimum bounding circle operation on the geometry. * * @param geometry - The input geometry. * @returns Returns the minimum bounding circle polygon with [curves](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/#curveRings). * @since 5.2 * @example * // Perform the minimum bounding circle operation * const minimumBoundingCircle = minimumBoundingCircleExecute(polygon); */ export function minimumBoundingCircleExecute(geometry: GeometryUnion): Polygon; /** * Performs the minimum bounding circle operation on the geometry. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [minimumBoundingCircleExecute()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/minimumBoundingCircleOperator/#minimumBoundingCircleExecute). * @param geometry - The input geometry. * @returns Returns the minimum bounding circle polygon with [curves](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/#curveRings). * @example * // Perform the minimum bounding circle operation * const minimumBoundingCircle = minimumBoundingCircleExecute(polygon); */ export function execute(geometry: GeometryUnion): Polygon; /** * Performs the minimum bounding circle operation on the geometry set. * * @param geometries - The set of input geometries. * All the geometries must have the same spatial reference. * @param options - Additional options. * @returns Returns the minimum bounding circle polygons with [curves](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/#curveRings). * @since 5.2 */ export function minimumBoundingCircleExecuteMany(geometries: GeometryUnion[], options?: MinimumBoundingCircleOptions): Polygon[]; /** * Performs the minimum bounding circle operation on the geometry set. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [minimumBoundingCircleExecuteMany()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/minimumBoundingCircleOperator/#minimumBoundingCircleExecuteMany). * @param geometries - The set of input geometries. * All the geometries must have the same spatial reference. * @param options - Additional options. * @returns Returns the minimum bounding circle polygons with [curves](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/#curveRings). */ export function executeMany(geometries: GeometryUnion[], options?: MinimumBoundingCircleOptions): Polygon[]; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `false`. * * @since 5.2 */ export const minimumBoundingCircleSupportsCurves: boolean; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `false`. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [minimumBoundingCircleSupportsCurves](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/minimumBoundingCircleOperator/#minimumBoundingCircleSupportsCurves). */ export const supportsCurves: ReturnType;