UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

36 lines (33 loc) 1.74 kB
/** * Performs a topological difference operation on 2D geometries. * * ![Difference operator](https://developers.arcgis.com/javascript/latest/assets/references/core/operators/difference.png "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`. * @example * // Creates a new geometry based on the difference of two polygons * const difference = differenceOperator.execute(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 instance 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 each input geometry from `geometries`, or null. The result has the dimensions of the `geometries`. */ 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`. */ export const supportsCurves: boolean;