ArcObjects Library Reference  (Geometry)    

IPolycurve.SplitAtPoint Method

Introduces a new vertex into this polyline at the location on it closest to the input point.

[Visual Basic 6.0]
Sub SplitAtPoint(
    ByVal splitPoint As IPoint, _
    ByVal projectOnto As Boolean, _
    ByVal createPart As Boolean, _
    SplitHappened As Boolean, _
    newPartIndex As Long, _
    newSegmentIndex As Long _
)
[Visual Basic .NET]
Public Sub SplitAtPoint ( _
    ByVal splitPoint As IPoint, _
    ByVal projectOnto As Boolean, _
    ByVal createPart As Boolean, _
    ByRef SplitHappened As Boolean, _
    ByRef newPartIndex As Integer, _
    ByRef newSegmentIndex As Integer _
)
[C#]
public void SplitAtPoint (
    IPoint splitPoint,
    bool projectOnto,
    bool createPart,
    ref bool SplitHappened,
    ref int newPartIndex,
    ref int newSegmentIndex
);
[Java]
public void splitAtPoint (
    IPoint splitPoint,
    Boolean projectOnto,
    Boolean createPart,
    Boolean SplitHappened,
    int newPartIndex,
    int newSegmentIndex
)
throws
    IOException,
    AutomationException
[C++]
HRESULT SplitAtPoint(
  IPoint* splitPoint,
  VARIANT_BOOL projectOnto,
  VARIANT_BOOL createPart,
  VARIANT_BOOL* SplitHappened,
  long* newPartIndex,
  long* newSegmentIndex
);
[C++]

Parameters

splitPoint

  splitPoint is a parameter of type IPoint

projectOnto

  projectOnto is a parameter of type VARIANT_BOOL

createPart

  createPart is a parameter of type VARIANT_BOOL

SplitHappened [out]

  SplitHappened is a parameter of type VARIANT_BOOL

newPartIndex [out]

  newPartIndex is a parameter of type long

newSegmentIndex [out]

  newSegmentIndex is a parameter of type long

Product Availability

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

Description

Adds a new vertex along the curve as the specified input point, or the projection onto the curve of the specified input point.

Remarks

projectOnto is an input parameter that determines if the output point will be located on the polycurve. If projectOnto is true and the input point is not already on the polycurve then the point is projected on the curve.

createPart is an input parameter that determines if parts (paths) have to be created. createPart must be FALSE for polygons.  For polylines, if createPart is TRUE, the part on which the new split point falls is split into two parts with the newly added vertex serving as the end of the first part and the beginning of the second.

SplitHappened is an output parameter that tells if the polycurve has been split or not.

newPartIndex is an output parameter that tells on which part (ring or path) the point has been introduced.

newSegmentIndex is an output parameter that tells what is the index of the new created segment. That index is zero based and part relative (start at 0 for each part).

 

SplitAtPoint Example

See Also

IPolycurve Interface

Example

SplitAtPoint_Example

 


Feedback Send feedback on this page