GetDefinition<T> Method (FileSystemDatastore)
Gets a specific
Definition instance associated with of type in the file-system data store. This method must be called on the MCT. Use QueuedTask.Run.
Parameters
- name
-
The name of the dataset.
Type Parameters
- T
-
The type of dataset definition.
Return Value
A specific
Definition instance corresponding to type or
UnknownDefinition if is not supported.
Get a TIN Defintion
public async Task GetTinDatasetDefinition()
{
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 def = dataStore.GetDefinition<ArcGIS.Core.Data.Analyst3D.TinDatasetDefinition>(dsName))
{
}
}
});
}
catch (GeodatabaseNotFoundOrOpenedException exception)
{
// Handle Exception.
}
}
Get a LAS Dataset Defintion
public async Task GetLasDatasetDefinition()
{
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.GetDefinition<ArcGIS.Core.Data.Analyst3D.LasDatasetDefinition>(name))
{
}
}
});
}
catch (GeodatabaseNotFoundOrOpenedException exception)
{
// Handle Exception.
}
}
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.