UNPKG

@arcgis/core

Version:

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

30 lines (28 loc) 1.41 kB
/** * Reshape 2D polygons or polylines with a single path polyline. * * @since 4.31 */ import type Polygon from "../Polygon.js"; import type Polyline from "../Polyline.js"; /** * Performs the reshape operation on a polygon or polyline using a single path polyline as the reshaper. * * The output geometry takes the shape of the multipath where it first intersects the reshaper to the last intersection. * The first and last intersection points of the reshaper are chosen closest to the end points of the reshaper in the case that multiple intersections are found. * For polygons, only individual paths can be reshaped. However, polylines can be reshaped across paths. * * @param geometry - The polygon or polyline to be reshaped. * @param reshaper - The single path polyline reshaper. * @returns If the `geometry` is a polygon, the return type is polygon, and if the `geometry` is a polyline, the return type is polyline. * If the `geometry` cannot be reshaped, then the return type is null. * @example * // Reshape a polygon geometry * const reshapedPolygon = reshapeOperator.execute(polygon, reshaperPolyline); */ export function execute(geometry: Polygon | Polyline, reshaper: Polyline): Polygon | Polyline | null | undefined; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `false`. */ export const supportsCurves: boolean;