ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.Raster Namespace / RasterDataset Class
Members Example

In This Topic
    RasterDataset Class
    In This Topic
    Represents a raster dataset on disk or in a geodatabase.
    Object Model
    RasterDataset ClassRaster ClassRaster ClassRaster ClassRasterBand ClassRasterBand ClassDatastore ClassRasterDatasetDefinition ClassEnvelope Class
    Syntax
    public class RasterDataset : BasicRasterDataset, System.IDisposable  
    Public Class RasterDataset 
       Inherits BasicRasterDataset
       Implements System.IDisposable 
    Example
    Open raster dataset in a folder
    // Create a FileSystemConnectionPath using the folder path.
    FileSystemConnectionPath connectionPath = new FileSystemConnectionPath(new System.Uri(@"C:\Temp"), FileSystemDatastoreType.Raster);
    // Create a new FileSystemDatastore using the FileSystemConnectionPath.
    FileSystemDatastore dataStore = new FileSystemDatastore(connectionPath);
    // Open the raster dataset.
    RasterDataset fileRasterDataset = dataStore.OpenDataset<RasterDataset>("Sample.tif");
    Open raster dataset in a geodatabase
    // Create a FileGeodatabaseConnectionPath using the path to the gdb. Note: This can be a path to a .sde file.
    FileGeodatabaseConnectionPath geodatabaseConnectionPath = new FileGeodatabaseConnectionPath(new Uri(@"C:\Temp\rasters.gdb"));
    // Create a new Geodatabase object using the FileGeodatabaseConnectionPath.
    Geodatabase geodatabase = new Geodatabase(geodatabaseConnectionPath);
    // Open the raster dataset.
    RasterDataset gdbRasterDataset = geodatabase.OpenDataset<RasterDataset>("sample");
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CoreObjectsBase
          ArcGIS.Core.Data.Dataset
             ArcGIS.Core.Data.Raster.BasicRasterDataset
                ArcGIS.Core.Data.Raster.RasterDataset
                   ArcGIS.Core.Data.Raster.FunctionRasterDataset

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also