require(["esri/geometry/operators/reshapeOperator"], (reshapeOperator) => { /* code goes here */ });
import * as reshapeOperator from "@arcgis/core/geometry/operators/reshapeOperator.js";
esri/geometry/operators/reshapeOperator
Reshape 2D polygons or polylines with a single path polyline.
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Performs the reshape operation on a polygon or polyline using a single path polyline as the reshaper. | reshapeOperator |
Method Details
-
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.
ParametersReturnsExample// Reshape a polygon geometry const reshapedPolygon = reshapeOperator.execute(polygon, reshaperPolyline);