@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
37 lines (34 loc) • 1.41 kB
TypeScript
/**
* Clips geometries with a 2D extent.
*
* 
*
* @since 4.31
*/
import type Extent from "../Extent.js";
import type { GeometryUnion, GeometryWithoutMeshUnion } from "../types.js";
/**
* Perform the clip operation on the input geometry.
*
* @param geometry - The geometry to be clipped.
* @param extent - The extent used to clip the geometry.
* @returns Returns the clipped geometry or null.
* @example
* // return a new geometry of a polygon clipped by the view's extent
* const clippedGeometry = clipOperator.execute(polygon, view.extent);
*/
export function execute(geometry: GeometryUnion, extent: Extent): GeometryWithoutMeshUnion | null | undefined;
/**
* Perform the clip operation on the input geometries.
*
* @param geometries - The array of geometries to be clipped.
* All the geometries must have the same spatial reference.
* @param extent - The extent used to clip the geometries.
* @returns Returns an array whose elements may either be clipped geometries or null.
*/
export function executeMany(geometries: GeometryUnion[], extent: Extent): (GeometryWithoutMeshUnion | null | undefined)[];
/**
* Indicates if the operator supports input geometries that contain curves.
* The value will always be `true`.
*/
export const supportsCurves: boolean;