ArcGIS Pro 3.7 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 Function New( _
       ByVal uri As Uri _
    )
    public TerrainLayerCreationParams( 
       Uri 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
    {
      // Note: Needs QueuedTask to run
      {
        string terrainPath = @"d:\Data\Terrain\filegdb_Containing_A_Terrain.gdb\FeatureDataset\Terrain_name";
        var terrainURI = new Uri(terrainPath);
    
        var terrainCP = new TerrainLayerCreationParams(terrainURI);
        terrainCP.Name = "My Terrain Layer";
        terrainCP.IsVisible = false;
        // Note: Needs QueuedTask to run
        {
          //Create the layer to the terrain
          terrainLayer = LayerFactory.Instance.CreateLayer<TerrainLayer>(terrainCP, map);
        }
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.2 or higher.
    See Also