ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ElevationProfileParameters Class
Members Example

In This Topic
    ElevationProfileParameters Class
    In This Topic
    Encapsulates a set of properties used in the generation of an elevation profile. Use with MapView.ShowElevationProfileGraph.
    Object Model
    ElevationProfileParameters ClassDisplayUnitFormat ClassElevationSurfaceLayer Class
    Syntax
    public class ElevationProfileParameters 
    Public Class ElevationProfileParameters 
    Example
    Show Elevation profile graph with a specific surface
    if (!MapView.Active.CanShowElevationProfileGraph())
      return;
    
    // find a specific elevation surface layer
    var eleLayer = MapView.Active.Map.GetElevationSurfaceLayers().FirstOrDefault(l => l.Name == "TIN");
    
    // set up the parameters
    var profileParams = new ElevationProfileParameters();
    profileParams.SurfaceLayer = eleLayer;
    profileParams.Densify = true;
    
    
    // show the elevation profile for a polyline using the params
    MapView.Active.ShowElevationProfileGraph([lineGeom], profileParams);
    
    // show the elevation profile for a set of points using the params
    MapView.Active.ShowElevationProfileGraph(pts, profileParams);
    
    Show Elevation profile graph between two points
    int numPoints = 20;
    
    if (!MapView.Active.CanShowElevationProfileGraph())
      return;
    
    // show the elevation profile 
    // use the default ground elevation surface
    MapView.Active.ShowElevationProfileGraph(startPt, endPt, numPoints);
    
    // find a specific elevation surface layer
    var tinLayer = MapView.Active.Map.GetElevationSurfaceLayers().FirstOrDefault(l => l.Name == "TIN");
    
    // set up the params
    var elevProfileParams = new ElevationProfileParameters();
    elevProfileParams.SurfaceLayer = tinLayer;
    elevProfileParams.Densify = false;
    
    // show the elevation profile using the params
    MapView.Active.ShowElevationProfileGraph(startPt, endPt, numPoints, elevProfileParams);
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.ElevationProfileParameters

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also