/** * Returns the planar length of a 2D geometry. * * ![Length operator](https://developers.arcgis.com/javascript/latest/assets/references/core/operators/length.png "Length operator") * * @since 4.31 */ import type { LengthUnit } from "../../core/units.js"; import type { GeometryUnion } from "../types.js"; export interface Options { /** * The length 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?: LengthUnit; } /** * Calculates the planar length of the input geometry. * * @param geometry - The geometry to calculate the length from. * @param options - Additional options. * @returns Returns the planar length of the geometry. * @example * // Calculate the length of a polyline * const length = lengthOperator.execute(polyline); */ export function execute(geometry: GeometryUnion, options?: Options): number; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `true`. * * @default true */ export const supportsCurves: boolean;