/** * Performs a topological difference operation on 2D geometries. * * ![Difference operator](https://developers.arcgis.com/javascript/latest/assets/references/core/operators/difference.avif "Difference operator") * * @since 4.31 */ import type { GeometryUnion, GeometryWithoutMeshUnion } from "../types.js"; /** * Performs the topological difference operation on the two geometries. * * @param geometry - The geometry instance on the left-hand side of the subtraction. * @param subtractor - The geometry on the right-hand side being subtracted. * @returns Returns the result of the subtraction from the `geometry`, or null. The result has the dimensions of the `geometry`. * @since 5.2 * @example * // Creates a new geometry based on the difference of two polygons * const difference = differenceExecute(polygon1, polygon2); */ export function differenceExecute(geometry: GeometryUnion, subtractor: GeometryUnion): GeometryWithoutMeshUnion | null | undefined; /** * Performs the topological difference operation on the two geometries. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [differenceExecute()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/differenceOperator/#differenceExecute). * @param geometry - The geometry instance on the left-hand side of the subtraction. * @param subtractor - The geometry on the right-hand side being subtracted. * @returns Returns the result of the subtraction from the `geometry`, or null. The result has the same dimensions as `geometry`. * @example * // Creates a new geometry based on the difference of two polygons * const difference = differenceExecute(polygon1, polygon2); */ export function execute(geometry: GeometryUnion, subtractor: GeometryUnion): GeometryWithoutMeshUnion | null | undefined; /** * Performs the topological difference operation on the geometry set. * * @param geometries - The set of geometry instances to be subtracted by the `subtractor`. * All the geometries must have the same spatial reference. * @param subtractor - The geometry on the right-hand side being subtracted. * @returns Returns an array whose elements are the result of subtracting `subtractor` from each input geometry in `geometries`. * Individual entries may be `null` or `undefined`. Each result has the dimensions of its corresponding input geometry. * @since 5.2 */ export function differenceExecuteMany(geometries: GeometryUnion[], subtractor: GeometryUnion): (GeometryWithoutMeshUnion | null | undefined)[]; /** * Performs the topological difference operation on the geometry set. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [differenceExecuteMany()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/differenceOperator/#differenceExecuteMany). * @param geometries - An array of geometries. * All the geometries must have the same spatial reference. * @param subtractor - The geometry to be subtracted from each and every geometry in `geometries`. * @returns Returns an array whose elements are the result of subtracting `subtractor` from each input geometry in `geometries`. * Individual entries may be `null` or `undefined`. Each result has the dimensions of its corresponding input geometry. */ export function executeMany(geometries: GeometryUnion[], subtractor: GeometryUnion): (GeometryWithoutMeshUnion | null | undefined)[]; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `true`. * * @since 5.2 */ export const differenceSupportsCurves: 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 [differenceSupportsCurves](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/differenceOperator/#differenceSupportsCurves). */ export const supportsCurves: ReturnType;