ArcObjects Library Reference (Geometry)  

IPolyline.Reshape Method

Modifies this polyline by replacing some of its segments with some segments from reshapeSource.

[Visual Basic .NET]
Public Function Reshape ( _
    ByVal reshapeSource As IPath _
) As Boolean
[C#]
public bool Reshape (
    IPath reshapeSource
);
[C++]
HRESULT Reshape(
  IPath* reshapeSource,
  VARIANT_BOOL* didReshape
);
[C++]

Parameters

reshapeSource

  reshapeSource is a parameter of type IPath

didReshape [out, retval]   didReshape is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Reshape replaces the Segments in the Polyline between consecutive Intersections with the input Path segments that connect those intersections.  Reshape returns a boolean indicating whether or not a modification to the Polyline occurred.

Algorithm of Reshape method is described below:

1. Find the intersections of the Reshape path with the polyline parts. Select two intersection points: The first one to be closest to the one end of the Reshape path, and the second one to be closest to the other end of the Reshape path.

2. If both intersecion points belong to the same part of the polyline, replace all the segments of the Polyline part between the selected intersection points with the subcurve of the Reshape path that is between the selected intersecion points.

3. If the selected intersection points belong to the different parts of the polyline, then connect the part of the polyline with the subcurve of the reshape path and get rid of the superflous segments of the parts:

a. for the first selected intersecting part (in the stored part order), get rid of all segments after the selected intersection,

b. for the other selected intersecting part, get rid of all segments before the selected intersection point.

Leave the parts that are between the selected intersecting parts intact, even if they intersect the Reshape path.

Direction of the Reshape path does not matter and can change. The order of the parts is preserved.

Result is not simple. No intersection points are introduced except the selected two.

 

 

 

Remarks

Note: For multipart (more than one path) polyline output part ordering may not be preserved. The orientation of vertices within parts is preserved.

See Also

IPolyline Interface | IPolyline.Reshape Method | IRing.Reshape Method