ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.Analyst3D Namespace / LasDataset Class
Members Example

In This Topic
    LasDataset Class
    In This Topic
    Represents a LAS dataset.
    Object Model
    LasDataset ClassDatastore ClassLasDatasetDefinition ClassEnvelope ClassLasPoint ClassLasPointCursor Class
    Syntax
    public sealed class LasDataset : ArcGIS.Core.Data.Dataset, System.IDisposable  
    Public NotInheritable Class LasDataset 
       Inherits ArcGIS.Core.Data.Dataset
       Implements System.IDisposable 
    Remarks
    The LAS dataset is a stand-alone file that resides in a folder and references lidar data in the LAS format with optional surface constraint features that define surface characteristics. The LAS dataset can reference one or more LAS or Optimized LAS (ZLAS) files.
    Example
    Open a LAS Dataset
    public async Task OpenLasDataset()
    {
      try
      {
        await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
        {
          string path = @"d:\Data\LASDataset";
          var fileConnection = new FileSystemConnectionPath(new Uri(path), FileSystemDatastoreType.LasDataset);
    
          using (FileSystemDatastore dataStore = new FileSystemDatastore(fileConnection))
          {
            string name = "utrecht_tile.lasd";      // can specify with or without the .lasd extension
    
            using (var dataset = dataStore.OpenDataset<ArcGIS.Core.Data.Analyst3D.LasDataset>(name))
            {
    
            }
          }
        });
      }
      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 LasDatasetLayer from a LasDataset
    //Must be on the QueuedTask.Run()
    
    var lasCP_ds = new LasDatasetLayerCreationParams(lasDataset);
    lasCP_ds.Name = "My LAS Layer";
    lasCP_ds.IsVisible = false;
    
    //Create the layer to the LAS dataset
    var lasDatasetLayer_ds = LayerFactory.Instance.CreateLayer<LasDatasetLayer>(lasCP_ds, map);
    
    Create a LasDatasetLayer with renderers
    //Must be on the QueuedTask.Run()
    
    var lasCP_renderers = new LasDatasetLayerCreationParams(lasDataset);
    lasCP_renderers.Name = "My LAS Layer";
    lasCP_renderers.IsVisible = false;
    
    // create a point elevation renderer
    var ptR = new LasStretchRendererDefinition();
    // accept all defaults
    
    // create a simple edge renderer
    var edgeR = new TinEdgeRendererDefintion();
    // accept all defaults
    
    // add renderers to dictionary
    var l_dict = new Dictionary<SurfaceRendererTarget, TinRendererDefinition>();
    l_dict.Add(SurfaceRendererTarget.Points, ptR);
    l_dict.Add(SurfaceRendererTarget.Edges, edgeR);
    
    // assign dictionary to creation params
    lasCP_renderers.RendererDefinitions = l_dict;
    
    //Create the layer to the LAS dataset
    var lasDatasetLayer_rd = LayerFactory.Instance.CreateLayer<LasDatasetLayer>(lasCP_renderers, map);
    
    Inheritance Hierarchy

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

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also