public sealed class LasDataset : ArcGIS.Core.Data.Dataset, System.IDisposable
Public NotInheritable Class LasDataset Inherits ArcGIS.Core.Data.Dataset Implements System.IDisposable
public sealed class LasDataset : ArcGIS.Core.Data.Dataset, System.IDisposable
Public NotInheritable Class LasDataset Inherits ArcGIS.Core.Data.Dataset Implements System.IDisposable
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. } }
//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(); } }
//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);
//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);
System.Object
ArcGIS.Core.CoreObjectsBase
ArcGIS.Core.Data.Dataset
ArcGIS.Core.Data.Analyst3D.LasDataset
Target Platforms: Windows 11, Windows 10