ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Layer Class / GetZs Method / GetZs(Double,Double) Method
The x-coordinate
The y-coordinate

In This Topic
    GetZs(Double,Double) Method
    In This Topic
    Obtains a point geometry with Z for the specified x,y; where the Z value is populated from the layer. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public SurfaceZsResult GetZs( 
       double x,
       double y
    )
    Public Overloads Function GetZs( _
       ByVal x As Double, _
       ByVal y As Double _
    ) As SurfaceZsResult

    Parameters

    x
    The x-coordinate
    y
    The y-coordinate

    Return Value

    A result that contains a status, plus an output geometry only if the status is favorable.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    If the layer has no data at the particular input geometry point, then the corresponding output geometry point Z will be set to the value specified in SurfaceZsMissingHandler.DefaultOutputZ.

    Use CanGetZs to determine if the layer can be used as an elevation source before calling this function.

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.4 or higher.
    See Also