ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / Multipoint Class / Copy3DCoordinatesToList Method
Example

In This Topic
    Copy3DCoordinatesToList Method (Multipoint)
    In This Topic
    Gets a copy of all the points as a read-only list of 3D coordinates.
    Syntax
    Public Function Copy3DCoordinatesToList() As IReadOnlyList(Of Coordinate3D)
    public IReadOnlyList<Coordinate3D> Copy3DCoordinatesToList()

    Return Value

    A readonly list of Coordinate3D.
    Example
    Modify the points of a Multipoint
    {
      // assume a multiPoint has been built from 4 points
      // the modified multiPoint will have the first point removed and the last point moved
    
      // use the builderEx constructors which don't need to run on the MCT.
      MultipointBuilderEx builderEx = new MultipointBuilderEx(multipoint);
      // remove the first point
      builderEx.RemovePoint(0);
      // modify the coordinates of the last point
      var ptEx = builderEx.GetPoint(builderEx.PointCount - 1);
      builderEx.RemovePoint(builderEx.PointCount - 1);
    
      var newPtEx = MapPointBuilderEx.CreateMapPoint(ptEx.X + 1.0, ptEx.Y + 2.0);
      builderEx.AddPoint(newPtEx);
      Multipoint modifiedMultiPointEx = builderEx.ToGeometry() as Multipoint;
    }
    Retrieve Points, 2D Coordinates, 3D Coordinates from a multipoint
    {
      ReadOnlyPointCollection pointsReadOnly = multipoint.Points;
      IReadOnlyList<Coordinate2D> coords2d = multipoint.Copy2DCoordinatesToList();
      IReadOnlyList<Coordinate3D> coords3d = multipoint.Copy3DCoordinatesToList();
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also