/** * Returns the planar area of a 2D geometry. * * ![Area operator](https://developers.arcgis.com/javascript/latest/assets/references/core/operators/area.avif "Area operator") * * @since 4.31 */ import type { AreaUnit } from "../../core/units.js"; import type { GeometryUnion } from "../types.js"; /** @since 5.2 */ export interface AreaOptions { /** * The area unit of the return value. * The default is the input geometry's spatial reference unit. * An error will be thrown if this is set for Geographic Coordinate Systems. */ unit?: AreaUnit; } /** * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [AreaOptions](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/areaOperator/#AreaOptions). */ export type Options = AreaOptions; /** * Calculates the planar area of the input geometry. * * @param geometry - The geometry to calculate the area from. * @param options - Additional options. * @returns Returns the planar area of the geometry. * @since 5.2 * @example * // Calculate the area of a polygon * const area = areaExecute(polygon); */ export function areaExecute(geometry: GeometryUnion, options?: AreaOptions): number; /** * Calculates the planar area of the input geometry. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [areaExecute()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/areaOperator/#areaExecute). * @param geometry - The geometry to calculate the area from. * @param options - Additional options. * @returns Returns the planar area of the geometry. * @example * // Calculate the area of a polygon * const area = areaExecute(polygon); */ export function execute(geometry: GeometryUnion, options?: AreaOptions): number; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `true`. * * @default true * @since 5.2 */ export const areaSupportsCurves: boolean; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `true`. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [areaSupportsCurves](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/areaOperator/#areaSupportsCurves). */ export const supportsCurves: ReturnType;