import { execute, supportsCurves } from "@arcgis/core/geometry/operators/reshapeOperator.js";const { execute, supportsCurves } = await $arcgis.import("@arcgis/core/geometry/operators/reshapeOperator.js");- Since
- ArcGIS Maps SDK for JavaScript 4.31
Reshape 2D polygons or polylines with a single path polyline.
Functions
execute
Function
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.
- Signature
-
execute (geometry: Polygon | Polyline, reshaper: Polyline): Polygon | Polyline | null | undefined
Parameters
Example
// Reshape a polygon geometryconst reshapedPolygon = reshapeOperator.execute(polygon, reshaperPolyline);Variables
supportsCurves
Variable
Indicates if the operator supports input geometries that contain curves.
The value will always be false.
- Type
- boolean