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

ArcGIS.Core.Geometry Namespace > IGeometryEngine Interface : Transform3D Method
The array of coordinates to be transformed.
The projection transformation specifying the input and output spatial references and possibly the geographic transformations to use for the transformation.
The array of transformed coordinates. If it is null or the length is less than the length of inCoordinates, then a new array will be allocated.
Transforms an array of 3D coordinates. Returns an array of transformed 3D coordinates.
Syntax

Parameters

inCoordinates
The array of coordinates to be transformed.
projectionTransformation
The projection transformation specifying the input and output spatial references and possibly the geographic transformations to use for the transformation.
outCoordinates
The array of transformed coordinates. If it is null or the length is less than the length of inCoordinates, then a new array will be allocated.

Return Value

The number of transformed coordinates.
Exceptions
ExceptionDescription
Input parameter, inCoordinates, is null.
ProjectionTransformation is null.
Remarks
This method should be applied to batches of coordinates for fast projection.

Unlike GeometryEngine.Transform2D there is no option to preserve all coordinates. This means that any coordinates outside of the horizone will be removed from the output array. The number of initialized elements in the output array is the number of coordinates transformed which may be less than the number of elements in inCoordinates.

Example
// Not all of the input points are transformed as some of them are outside of the GCS horizon.
Coordinate3D[] inCoords3D = new Coordinate3D[]
{
  new Coordinate3D(-1, -1, 0),
  new Coordinate3D(-2, -5, 1),
  new Coordinate3D(-5, -11, 2),
  new Coordinate3D(-10, -19, 3),
  new Coordinate3D(-17, -29, 4),
  new Coordinate3D(-26, -41, 5),
  new Coordinate3D(-37, -5, 6),
  new Coordinate3D(-50, -21, 7),
  new Coordinate3D(-65, -39, 8),
  new Coordinate3D(-82, -9, 9)
};

int arraySize = inCoords3D.Length;

ProjectionTransformation projTrans = ProjectionTransformation.Create(SpatialReferences.WGS84, SpatialReferenceBuilder.CreateSpatialReference(24891));

Coordinate3D[] outCoords3D = new Coordinate3D[arraySize];

// transform and choose to remove the clipped coordinates
int numPointsTransformed = GeometryEngine.Instance.Transform3D(inCoords3D, projTrans, ref outCoords3D);

// numPointsTransformed = 4
// outCoords2D.Length = 4

// outCoords2D[0] = {5580417.6876455201, 1328841.2376554986, 7}
// outCoords2D[1] = {3508774.290814558, -568027.23444226268, 8}
// outCoords2D[2] = {1568096.0886155984, -2343435.4394415971, 9}
// outCoords2D[3] = {57325.827391741652, 1095146.8917508761, 10}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

IGeometryEngine Interface
IGeometryEngine Members