ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TerrainLayerCreationParams Class / TerrainLayerCreationParams Constructor / TerrainLayerCreationParams Constructor(Uri)
A System.Uri represents the path or url to a dataset or .lyrx or .lpkx file.
Example

In This Topic
    TerrainLayerCreationParams Constructor(Uri)
    In This Topic
    Creates a parameter object with a System.Uri.
    Syntax
    public TerrainLayerCreationParams( 
       Uri uri
    )
    Public Function New( _
       ByVal uri As Uri _
    )

    Parameters

    uri
    A System.Uri represents the path or url to a dataset or .lyrx or .lpkx file.
    Remarks

    Some sample paths to:

    A Terrain in a FileGeodatabase C:\Data\MyFileGDB.gdb\HurricaneTerrain

    Example
    Create a TerrainLayer
    //Must be on the QueuedTask.Run()
    
    string terrainPath = @"d:\Data\Terrain\filegdb_Containing_A_Terrain.gdb";
    var terrainURI = new Uri(terrainPath);
    
    var terrainCP = new TerrainLayerCreationParams(terrainURI);
    terrainCP.Name = "My Terrain Layer";
    terrainCP.IsVisible = false;
    
    //Create the layer to the terrain
    var terrainLayer = LayerFactory.Instance.CreateLayer<TerrainLayer>(terrainCP, map);
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also