/** * Returns the geodetic area of a 2D geometry. * * > [!WARNING] * > * > **Notes** * > * > Verify that `isLoaded()` returns `true` before using this module. * > Use `load()` to load this module's dependencies. * * @since 4.31 */ import type { AreaUnit } from "../../core/units.js"; import type { GeometryUnion, GeodeticCurveType } from "../types.js"; /** @since 5.2 */ export interface GeodeticAreaOptions { /** * The type of geodetic curve used to determine the area. * * @default "geodesic" */ curveType?: GeodeticCurveType; /** * The area unit of the return value. * * @default "square-meters" */ unit?: AreaUnit; } /** * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [GeodeticAreaOptions](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/geodeticAreaOperator/#GeodeticAreaOptions). */ export type Options = GeodeticAreaOptions; /** * Indicates if all dependencies of this module have been loaded. * * @returns Returns `true` if this module's dependencies have been loaded. * @since 5.2 */ export function geodeticAreaIsLoaded(): boolean; /** * Indicates if all dependencies of this module have been loaded. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [geodeticAreaIsLoaded()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/geodeticAreaOperator/#geodeticAreaIsLoaded). * @returns Returns `true` if this module's dependencies have been loaded. */ export function isLoaded(): boolean; /** * Loads this module's dependencies. This method must be called first if `geodeticAreaIsLoaded` returns `false`. * * @returns Resolves when the dependencies have been loaded. * @since 5.2 * @see [geodeticAreaIsLoaded()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/geodeticAreaOperator/#geodeticAreaIsLoaded) */ export function geodeticAreaLoad(): Promise; /** * Loads this module's dependencies. This method must be called first if `isLoaded` returns `false`. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [geodeticAreaLoad()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/geodeticAreaOperator/#geodeticAreaLoad). * @returns Resolves when the dependencies have been loaded. * @see [isLoaded()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/geodeticAreaOperator/#isLoaded) */ export function load(): Promise; /** * Calculates the geodetic area of the input Geometry. * Unless the `unit` option is set, the default is square-meters. * * @param geometry - The input geometry. * @param options - Additional options. * @returns Returns the geodetic area of the input geometry. * @since 5.2 * @example * if (!geodeticAreaIsLoaded()) { * await geodeticAreaLoad(); * } * * // Calculate the geodetic area of a polygon. * const area = geodeticAreaExecute(polygon); */ export function geodeticAreaExecute(geometry: GeometryUnion, options?: GeodeticAreaOptions): number; /** * Calculates the geodetic area of the input Geometry. * Unless the `unit` option is set, the default is square-meters. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [geodeticAreaExecute()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/geodeticAreaOperator/#geodeticAreaExecute). * @param geometry - The input geometry. * @param options - Additional options. * @returns Returns the geodetic area of the input geometry. * @example * if (!geodeticAreaIsLoaded()) { * await geodeticAreaLoad(); * } * * // Calculate the geodetic area of a polygon. * const area = geodeticAreaExecute(polygon); */ export function execute(geometry: GeometryUnion, options?: GeodeticAreaOptions): number; /** * Indicates if the operator supports input geometries that contain curves. * The value is `null` or `undefined` until the operator is loaded, then it will always be `true`. * * @since 5.2 */ export const geodeticAreaSupportsCurves: boolean | null | undefined; /** * Indicates if the operator supports input geometries that contain curves. * The value is `null` or `undefined` until the operator is loaded, then it will always be `true`. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [geodeticAreaSupportsCurves](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/geodeticAreaOperator/#geodeticAreaSupportsCurves). */ export const supportsCurves: boolean | null | undefined;