ArcObjects Library Reference (Geometry)  

IGeometryServer2.Reshape Method

Reshapes the target polyline or polygon. The reshaping polyline can have only one part. If the target was not reshaped, an empty geometry of the saem type is returned.

[Visual Basic .NET]
Public Function Reshape ( _
    ByVal pSR As ISpatialReference, _
    ByVal pTarget As IGeometry, _
    ByVal pReshaper As IPolyline _
) As IGeometry
[C#]
public IGeometry Reshape (
    ISpatialReference pSR,
    IGeometry pTarget,
    IPolyline pReshaper
);
[C++]
HRESULT Reshape(
  ISpatialReference* pSR,
  IGeometry* pTarget,
  IPolyline* pReshaper,
  IGeometry** pReshaped
);
[C++]

Parameters

pSR

  pSR is a parameter of type ISpatialReference

pTarget

  pTarget is a parameter of type IGeometry

pReshaper

  pReshaper is a parameter of type IPolyline

pReshaped [out, retval]

  pReshaped is a parameter of type IGeometry

Product Availability

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

Remarks

Reshapes the target polyline or polygon. The reshaping polyline can have only one part. If the reshaper does not intersect the target polyline, or does not define a closed loop for the target polygon, then an empty geometry of the same type as the target geometry is returned.  The  orientation of the reshaper is not considered. The following rules for polygon and polyline reshaping are used:

Polygons:. only one ring (part) is explicitly reshaped – the first one in index order that intersects the reshaping path. The longest portion of the original ring boundary is preserved. The reshaped polygon is re-simplified after the reshape operation has been applied, so the rules for simplification will determine what happens if multiple rings interact with the reshaping path. The graphics show how preserving the longest portion of the boundary can invert the ring in some cases. If more complicated reshaping behavior is desired, a combination of auto-complete, cutting and union can be used.

 Reshape1

 

Polylines: multiple paths (parts) can be affected by the reshaping path. The following graphics show three cases. The polyline being reshaped has part sequence and part orientations shown in red in the upper left graphic. The reshape is shown on the left of each row. The result is shown on the right of each row.

 Reshape2

See Also

IGeometryServer2 Interface