reshape static method

Multipart? reshape(
  1. {required Multipart geometry,
  2. required Polyline reshaper}
)

Reshape polygons or polylines with a single path polyline.

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 Multi_path 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. If the geometry cannot be reshaped by the input reshaper, then null is returned.

Parameters:

  • geometry — The polygon or polyline to be reshaped.
  • reshaper — The single path polyline reshaper.

Return Value: The reshaped polygon or polyline, or null if geometry could not be reshaped.

Implementation

static Multipart? reshape(
    {required Multipart geometry, required Polyline reshaper}) {
  _initializeArcGISEnvironmentIfNeeded();
  final objectHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_GeometryEngine_reshape(
        geometry._handle, reshaper._handle, errorHandler);
  });
  return Multipart._fromHandle(objectHandle);
}