ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ElevationSurfaceLayer Class
Members Example

In This Topic
    ElevationSurfaceLayer Class
    In This Topic
    Represents an elevation surface layer in the map or scene.
    Object Model
    ElevationSurfaceLayer ClassLayer ClassCIMColor ClassCIMDataConnection ClassTimeExtent ClassCIMBaseLayer ClassElevationTypeDefinition ClassSpatialReference ClassTimeParameters ClassSurfaceZsResult ClassMap ClassILayerContainer InterfaceEnvelope Class
    Syntax
    Example
    Create a New Elevation Surface
    {
        //Define a ServiceConnection to use for the new Elevation surface
        var serverConnection = new CIMInternetServerConnection
        {
            Anonymous = true,
            HideUserProperty = true,
            URL = "https://elevation.arcgis.com/arcgis/services"
        };
        CIMAGSServiceConnection serviceConnection = new CIMAGSServiceConnection
        {
            ObjectName = "WorldElevation/Terrain",
            ObjectType = "ImageServer",
            URL = "https://elevation.arcgis.com/arcgis/services/WorldElevation/Terrain/ImageServer",
            ServerConnection = serverConnection
        };
        //Defines a new elevation source set to the CIMAGSServiceConnection defined above
        //Get the elevation surfaces defined in the map
        var listOfElevationSurfaces = map.GetElevationSurfaceLayers();
        //Add the new elevation surface 
        var elevationLyrCreationParams = new ElevationLayerCreationParams(serviceConnection);
        //Note: needs to be called on the MCT
        var elevationSurface = LayerFactory.Instance.CreateLayer<ElevationSurfaceLayer>(
            elevationLyrCreationParams, map);
    }
    Get the elevation surface layers and elevation source layers from a map
    {
        // retrieve the elevation surface layers in the map including the Ground
        var surfaceLayers = map.GetElevationSurfaceLayers();
    
        // retrieve the single ground elevation surface layer in the map
        var groundSurfaceLayer = map.GetGroundElevationSurfaceLayer();
    
        // determine the number of elevation sources in the ground elevation surface layer
        int numberGroundSources = groundSurfaceLayer.Layers.Count;
        // get the first elevation source layer from the ground elevation surface layer
        var groundSourceLayer = groundSurfaceLayer.Layers.FirstOrDefault();
    }
    Find an elevation surface layer
    {
        // retrieve the elevation surface layers in the map 
        var surfaceLayers = map.GetElevationSurfaceLayers();
        // find a specific elevation surface layer by its URI
        var surfaceLayer = surfaceLayers.FirstOrDefault(l => l.Name == "Surface2");
        // or use the FindElevationSurfaceLayer method, passing the layer URI
        surfaceLayer = map.FindElevationSurfaceLayer("layerUri");
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase
          ArcGIS.Desktop.Mapping.MapMember
             ArcGIS.Desktop.Mapping.Layer
                ArcGIS.Desktop.Mapping.CompositeLayer
                   ArcGIS.Desktop.Mapping.ElevationSurfaceLayer

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also