ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.Analyst3D Namespace / TinDataset Class
Members Example

In This Topic
    TinDataset Class
    In This Topic
    Represents a TIN dataset.
    Object Model
    TinDataset ClassPolygon ClassDatastore ClassTinDatasetDefinition ClassTinEdge ClassEnvelope ClassEnvelope ClassTinEdge ClassTinNode ClassTinNode ClassEnvelope ClassTinTriangle ClassTinTriangle ClassTinEdgeCursor ClassTinNodeCursor ClassTinTriangleCursor Class
    Syntax
    public sealed class TinDataset : ArcGIS.Core.Data.Dataset, System.IDisposable  
    Public NotInheritable Class TinDataset 
       Inherits ArcGIS.Core.Data.Dataset
       Implements System.IDisposable 
    Example
    Open a TIN Dataset
    public async Task OpenTinDataset()
    {
      try
      {
        await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
        {
          string path = @"d:\Data\Tin";
          var fileConnection = new FileSystemConnectionPath(new Uri(path), FileSystemDatastoreType.Tin);
    
          using (FileSystemDatastore dataStore = new FileSystemDatastore(fileConnection))
          {
            // TIN is in a folder at d:\Data\Tin\TinDataset
    
            string dsName = "TinDataset";
    
            using (var dataset = dataStore.OpenDataset<ArcGIS.Core.Data.Analyst3D.TinDataset>(dsName))
            {
    
            }
          }
        });
      }
      catch (GeodatabaseNotFoundOrOpenedException exception)
      {
        // Handle Exception.
      }
    }
    Retrieve dataset objects
    //Must be on the QueuedTask.Run()
    
    Envelope extent;
    SpatialReference sr;
    using (var tin = tinLayer.GetTinDataset())
    {
      using (var tinDef = tin.GetDefinition())
      {
        extent = tinDef.GetExtent();
        sr = tinDef.GetSpatialReference();
      }
    }
    
    using (var terrain = terrainLayer.GetTerrain())
    {
      using (var terrainDef = terrain.GetDefinition())
      {
        extent = terrainDef.GetExtent();
        sr = terrainDef.GetSpatialReference();
      }
    }
    
    using (var lasDataset = lasDatasetLayer.GetLasDataset())
    {
      using (var lasDatasetDef = lasDataset.GetDefinition())
      {
        extent = lasDatasetDef.GetExtent();
        sr = lasDatasetDef.GetSpatialReference();
      }
    }
    Create a TinLayer from a dataset
    //Must be on the QueuedTask.Run()
    
    var tinCP_ds = new TinLayerCreationParams(tinDataset);
    tinCP_ds.Name = "My TIN Layer";
    tinCP_ds.IsVisible = false;
    
    //Create the layer to the TIN
    
    var tinLayer_ds = LayerFactory.Instance.CreateLayer<TinLayer>(tinCP_ds, map);
    Create a TinLayer with renderers
    //Must be on the QueuedTask.Run()
    
    var tinCP_renderers = new TinLayerCreationParams(tinDataset);
    tinCP_renderers.Name = "My TIN layer";
    tinCP_renderers.IsVisible = true;
    
    // define the node renderer - use defaults
    var node_rd = new TinNodeRendererDefinition();
    
    // define the face/surface renderer
    var face_rd = new TinFaceClassBreaksRendererDefinition();
    face_rd.ClassificationMethod = ClassificationMethod.NaturalBreaks;
    // accept default color ramp, breakCount
    
    // set up the renderer dictionary
    var rendererDict = new Dictionary<SurfaceRendererTarget, TinRendererDefinition>();
    rendererDict.Add(SurfaceRendererTarget.Points, node_rd);
    rendererDict.Add(SurfaceRendererTarget.Surface, face_rd);
    
    // assign the dictionary to the creation params
    tinCP_renderers.RendererDefinitions = rendererDict;
    
    // create the layer
    var tinLayer_rd = LayerFactory.Instance.CreateLayer<TinLayer>(tinCP_renderers, MapView.Active.Map);
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CoreObjectsBase
          ArcGIS.Core.Data.Dataset
             ArcGIS.Core.Data.Analyst3D.TinDataset

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also