ArcGIS Pro 2.6 API Reference Guide
SplitAtPoint Method (IGeometryEngine)
Example 

ArcGIS.Core.Geometry Namespace > IGeometryEngine Interface : SplitAtPoint Method
The multipart along which the point will be inserted.
The point to be inserted.
Determines if the output point will be located on the curve. If true and the splitPoint is not already on the curve then the point is projected onto the curve.
Determines if parts are to be created. MUST be false for polygons. For polylines, if 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.
Determines if a split occurred.
Part index that has the point added. If splitOccurred is false, this value should be ignored.
Segment index that has the point added. The segment may be a newly created segment. If splitOccurred is false, this value should be ignored.
Adds a new vertex along the curve at the specified input point, or the projection onto the curve of the specified input point.
Syntax

Parameters

multipart
The multipart along which the point will be inserted.
splitPoint
The point to be inserted.
projectOnto
Determines if the output point will be located on the curve. If true and the splitPoint is not already on the curve then the point is projected onto the curve.
createPart
Determines if parts are to be created. MUST be false for polygons. For polylines, if 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.
splitOccurred
Determines if a split occurred.
partIndex
Part index that has the point added. If splitOccurred is false, this value should be ignored.
segmentIndex
Segment index that has the point added. The segment may be a newly created segment. If splitOccurred is false, this value should be ignored.

Return Value

A geometry with the new vertex added. If no split occurred, then the original multipart is returned.
Exceptions
ExceptionDescription
Either multipartor splitPointor both are null or empty.
createPart must be false for polygons.
Incompatible spatial references between the input geometries.
Remarks
Geometry must be either a Polygon or a Polyline.
Example
// define a polyline
MapPoint startPointZ = MapPointBuilder.CreateMapPoint(1, 1, 5);
MapPoint endPointZ = MapPointBuilder.CreateMapPoint(20, 1, 5);

Polyline polylineZ = PolylineBuilder.CreatePolyline(new List<MapPoint>() { startPointZ, endPointZ });

// define a split point
MapPoint splitPointAboveLine = MapPointBuilder.CreateMapPoint(10, 10, 10);

bool splitOccurred;
int partIndex;
int segmentIndex;

// split the polyline at the point.  dont project the split point onto the line, don't create a new part
var splitPolyline = GeometryEngine.Instance.SplitAtPoint(polylineZ, splitPointAboveLine, false, false, out splitOccurred, out partIndex, out segmentIndex);

// splitOccurred = true
// partIndex = 0
// segmentIndex = 1
// splitPolyline.PointCount = 3
// splitPolyline.PartCount = 1
// splitPolyline coordinates are (1, 1, 5), (10, 10, 10), (20, 1, 5)

// split the polyline at the point.  dont project the split point onto the line, do create a new part
splitPolyline = GeometryEngine.Instance.SplitAtPoint(polylineZ, splitPointAboveLine, false, false, out splitOccurred, out partIndex, out segmentIndex);

// splitOccurred = true
// partIndex = 1
// segmentIndex = 0
// splitPolyline.PointCount = 4
// splitPolyline.PartCount = 2
// splitPolyline first part coordinates are (1, 1, 5), (10, 10, 10)
// splitPolyline second part coordinates are (10, 10, 10), (20, 1, 5)


// split the polyline at the point.  do project the split point onto the line, don't create a new part
splitPolyline = GeometryEngine.Instance.SplitAtPoint(polylineZ, splitPointAboveLine, false, false, out splitOccurred, out partIndex, out segmentIndex);

// splitOccurred = true
// partIndex = 0
// segmentIndex = 1
// splitPolyline.PointCount = 3
// splitPolyline.PartCount = 1
// splitPolyline coordinates are (1, 1, 5), (10, 10, 5), (20, 1, 5)

// split the polyline at the point.  do project the split point onto the line, do create a new part
splitPolyline = GeometryEngine.Instance.SplitAtPoint(polylineZ, splitPointAboveLine, false, false, out splitOccurred, out partIndex, out segmentIndex);

// splitOccurred = true
// partIndex = 1
// segmentIndex = 0
// splitPolyline.PointCount = 4
// splitPolyline.PartCount = 2
// splitPolyline first part coordinates are (1, 1, 5), (10, 10, 5)
// splitPolyline second part coordinates are (10, 10, 5), (20, 1, 5)


//
// try to split with a point that won't split the line  - pt extends beyond the line
//

var pointAfterLine = MapPointBuilder.CreateMapPoint(50, 1, 10);
splitPolyline = GeometryEngine.Instance.SplitAtPoint(polylineZ, pointAfterLine, false, false, out splitOccurred, out partIndex, out segmentIndex);

// splitOccurred = false
// ignore partIndex, sgementIndex
// splitPolyline is the same as polylineZ


///
///  multipart polygon
///
List<Coordinate3D> coordsZ = new List<Coordinate3D>()
{
  new Coordinate3D(10,10,5),
  new Coordinate3D(10,20,5),
  new Coordinate3D(20,20,5),
  new Coordinate3D(20,10,5)
};

List<Coordinate3D> coordsZ_2ndPart = new List<Coordinate3D>()
{
  new Coordinate3D(30,20,10),
  new Coordinate3D(30,30,10),
  new Coordinate3D(35,28,10),
  new Coordinate3D(40,30,10),
  new Coordinate3D(40,20,10),
};

Polygon multipart = null;

// Builder constructors need to run on the MCT.
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
  var builder = new PolygonBuilder();
  builder.HasZ = true;
  builder.AddPart(coordsZ);
  builder.AddPart(coordsZ_2ndPart);

  multipart = builder.ToGeometry();
});

// pointA is closer to the first part of the multipart - the split occurs in the first part
var pointA = MapPointBuilder.CreateMapPoint(22, 18, 7);
var splitPolygon = GeometryEngine.Instance.SplitAtPoint(multipart, pointA, false, false, out splitOccurred, out partIndex, out segmentIndex);

// splitPolygon.PointCount = 12
// splitPolygon.PartCount = 2
// splitPolygon first part coordinates  (10, 10, 5), (10, 20, 5), (20, 20, 5), (22, 18, 7), (20, 10, 5), (10, 10, 5)


// pointB is midPoint between the 2 parts - no split will occur
var pointB = MapPointBuilder.CreateMapPoint(25, 20, 7);
splitPolygon = GeometryEngine.Instance.SplitAtPoint(multipart, pointB, true, false, out splitOccurred, out partIndex, out segmentIndex);

// splitOccurred = false
// ignore partIndex, sgementIndex
// splitPolyline is the same as polylineZ
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

IGeometryEngine Interface
IGeometryEngine Members