Public Function CalculateCoordinates() As IReadOnlyList(Of Coordinate2D)
public IReadOnlyList<Coordinate2D> CalculateCoordinates()
Return Value
A IReadOnlyList of ArcGIS.Core.Geometry.Coordinate2D
Public Function CalculateCoordinates() As IReadOnlyList(Of Coordinate2D)
public IReadOnlyList<Coordinate2D> CalculateCoordinates()
| Exception | Description |
|---|---|
| System.ArgumentException | Coordinates cannot be calculated for the traverse. |
var startPoint = MapPointBuilderEx.CreateMapPoint(7500500.0, 445900.0, spatialReference); travParcel.StartPoint = startPoint; // The geometry of the features created is affected by the ground to grid correction. // This correction is also assigned to the traverse and in the following code the // active map's ground to grid correction is used. var g2gCorrection = map?.GetDefinition()?.GroundToGridCorrection; if (g2gCorrection != null) { travParcel.UseGroundToGridCorrections = true; travParcel.GroundToGridCorrection = g2gCorrection; } else travParcel.UseGroundToGridCorrections = false; // calculate coordinates if (travParcel.CanCalculateCoordinates()) { var coords = travParcel.CalculateCoordinates(); var sb = new StringBuilder(); sb.AppendLine("Calculated Coordinates:"); foreach (var coord in coords) { sb.AppendLine($"{coord.X:F2}, {coord.Y:F2}"); } }
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)