ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / ConstructPointFromAngleDistance Method
The input point.
The angle in radians measured counterclockwise from the horizontal axis.
The distance. Cannot be negative. If the distance is equal to zero, then the output point will have the same xy-coordinates as the input point.
(Optional) The spatial reference of the output point. The default value is null.
Example

In This Topic
    ConstructPointFromAngleDistance Method (GeometryEngine)
    In This Topic
    Constructs a point at a specified angle from the horizontal axis and a specified distance away from the input point.
    Syntax
    Public Function ConstructPointFromAngleDistance( _
       ByVal inputPoint As MapPoint, _
       ByVal angle As Double, _
       ByVal distance As Double, _
       Optional ByVal spatialReference As SpatialReference _
    ) As MapPoint

    Parameters

    inputPoint
    The input point.
    angle
    The angle in radians measured counterclockwise from the horizontal axis.
    distance
    The distance. Cannot be negative. If the distance is equal to zero, then the output point will have the same xy-coordinates as the input point.
    spatialReference
    (Optional) The spatial reference of the output point. The default value is null.

    Return Value

    A point at the specified angle and distance.
    Exceptions
    ExceptionDescription
    The input point is null or empty.
    The distance is less than zero.
    Remarks
    No Z, M or ID attributes are derived in the output point.
    Example
    Construct a Point at a distance and angle from an existing Point
    MapPoint inPoint = MapPointBuilderEx.CreateMapPoint(3, 4);
    double angle = 0;
    double distance = 10;
    
    MapPoint outPoint = GeometryEngine.Instance.ConstructPointFromAngleDistance(inPoint, angle, distance);
    // outPoint.X = 13
    // outPoint.Y = 4
    
    SpatialReference sr = SpatialReferences.WGS84;
    inPoint = MapPointBuilderEx.CreateMapPoint(0, 0, sr);
    angle = Math.PI;
    distance = 1;
    
    outPoint = GeometryEngine.Instance.ConstructPointFromAngleDistance(inPoint, angle, distance, sr);
    // outPoint.X = -1
    // outPoint.Y = 0
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also