ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Map Class / GetElevationProfileFromSurfaceAsync Method / GetElevationProfileFromSurfaceAsync(IEnumerable<MapPoint>,ElevationSurfaceLayer,SurfaceZsMissingHandler,CancellationToken) Method
A set of points.
Identifies the surface to be used. If null is specified, then the default Ground Surface will be used.
provides options to handle missing Zs in the surface
provides a way to cancel the operation

In This Topic
    GetElevationProfileFromSurfaceAsync(IEnumerable<MapPoint>,ElevationSurfaceLayer,SurfaceZsMissingHandler,CancellationToken) Method
    In This Topic
    Gets an elevation profile for the specified points. All Z values of the calculated polyline are populated from the specified Elevation Surface Layer.
    Syntax

    Parameters

    points
    A set of points.
    surfaceLayer
    Identifies the surface to be used. If null is specified, then the default Ground Surface will be used.
    missingHandler
    provides options to handle missing Zs in the surface
    cancellationToken
    provides a way to cancel the operation

    Return Value

    An ElevationProfileResult. If successful, this contains the generated polyline.
    Exceptions
    ExceptionDescription
    polylines cannot be null.
    This Map does not have the specified surfaceLayer.
    This Map does not have a visible Ground Surface Layer.
    Remarks
    The missingHandler will be used to determine what to do if the surface has no data at a particular input geometry point. 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.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.4 or higher.
    See Also