@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
40 lines (37 loc) • 2.03 kB
TypeScript
/**
* 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.
*
* 
*
* @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 of dimensions of the two geometries.
* @example
* // Calculate the symmetric difference of two polygons.
* const differencePolygon = symmetricDifferenceOperator.execute(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.
*/
export function executeMany(inputGeometries: GeometryUnion[], rightGeometry: GeometryUnion): GeometryWithoutMeshUnion[];
/**
* Indicates if the operator supports input geometries that contain curves.
* The value will always be `true`.
*/
export const supportsCurves: boolean;