ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Layer Class / GetZsAsync Method / GetZsAsync(Double,Double,SurfaceZsMissingHandler,CancellationToken) Method
The x-coordinate
The y-coordinate
Provides options to handle missing Zs
Provides a way to cancel the operation

In This Topic
    GetZsAsync(Double,Double,SurfaceZsMissingHandler,CancellationToken) Method
    In This Topic
    Obtains a point geometry with Z for the specified (x,y); where the Z value is populated from the layer.
    Syntax

    Parameters

    x
    The x-coordinate
    y
    The y-coordinate
    missingHandler
    Provides options to handle missing Zs
    cancellationToken
    Provides a way to cancel the operation

    Return Value

    A result that contains a status, plus an output geometry only if the status is favorable.
    Remarks
    The missingHandler will be used to determine what to do if the layer has no data at the particular input coordinate. The corresponding output geometry point or vertex Z will be set to the value specified in the provided missingHandler.OutputZ property. The missingHandler.OnlyProcessMissingZs parameter can be used to overwrite all Z values or only those that are designated as missing based on a comparison with the InputZ value.

    Use CanGetZsAsync 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