/** * Returns the symmetric difference between 2D geometries, also known as exclusive OR, or XOR. * The symmetric difference is the union of the geometries minus the intersection. * * This operation can be performed only on geometries that have same dimension (e.g. points with points, lines with lines, polygons with polygons or envelopes, etc). * Otherwise, the output will be the input geometry of the higher topological dimension. * * ![Symmetric difference operator](https://developers.arcgis.com/javascript/latest/assets/references/core/operators/symmetricDifference.avif "Symmetric difference operator") * * @since 4.31 * @see [Wikipedia - Symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) */ import type { GeometryUnion, GeometryWithoutMeshUnion } from "../types.js"; /** * Performs the symmetric difference (XOR) operation on two geometries. * * @param leftGeometry - The first geometry to be XOR'd. * @param rightGeometry - The second geometry to be XOR'd. * @returns Returns the symmetric difference of the two geometries. The result has the higher dimension of the two geometries. * @since 5.2 * @example * // Calculate the symmetric difference of two polygons. * const differencePolygon = symmetricDifferenceExecute(polygon1, polygon2); */ export function symmetricDifferenceExecute(leftGeometry: GeometryUnion, rightGeometry: GeometryUnion): GeometryWithoutMeshUnion; /** * Performs the symmetric difference (XOR) operation on two geometries. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [symmetricDifferenceExecute()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/symmetricDifferenceOperator/#symmetricDifferenceExecute). * @param leftGeometry - The first geometry to be XOR'd. * @param rightGeometry - The second geometry to be XOR'd. * @returns Returns the symmetric difference of the two geometries. The result has the higher dimension of the two geometries. * @example * // Calculate the symmetric difference of two polygons. * const differencePolygon = symmetricDifferenceExecute(polygon1, polygon2); */ export function execute(leftGeometry: GeometryUnion, rightGeometry: GeometryUnion): GeometryWithoutMeshUnion; /** * Performs the symmetric difference (XOR) operation on every geometry in `inputGeometries` with `rightGeometry`. * * @param inputGeometries - The set of geometries to be XOR'd by the `rightGeometry`. * @param rightGeometry - The geometry being XOR'd with the `inputGeometries`. * @returns Returns an array of the result geometries. * @since 5.2 */ export function symmetricDifferenceExecuteMany(inputGeometries: GeometryUnion[], rightGeometry: GeometryUnion): GeometryWithoutMeshUnion[]; /** * Performs the symmetric difference (XOR) operation on every geometry in `inputGeometries` with `rightGeometry`. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [symmetricDifferenceExecuteMany()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/symmetricDifferenceOperator/#symmetricDifferenceExecuteMany). * @param inputGeometries - The set of geometries to be XOR'd by the `rightGeometry`. * @param rightGeometry - The geometry being XOR'd with the `inputGeometries`. * @returns Returns an array of the result geometries. */ export function executeMany(inputGeometries: GeometryUnion[], rightGeometry: GeometryUnion): GeometryWithoutMeshUnion[]; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `true`. * * @since 5.2 */ export const symmetricDifferenceSupportsCurves: 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 [symmetricDifferenceSupportsCurves](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/symmetricDifferenceOperator/#symmetricDifferenceSupportsCurves). */ export const supportsCurves: ReturnType;