ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Data.Raster Namespace / RasterBand Class
Members Example

In This Topic
    RasterBand Class
    In This Topic
    Represents a single band of a RasterDataset
    Object Model
    RasterBand ClassRaster ClassTable ClassRasterColormap ClassDatastore ClassRasterBandDefinition ClassEnvelope Class
    Syntax
    public sealed class RasterBand : BasicRasterDataset, System.IDisposable  
    Public NotInheritable Class RasterBand 
       Inherits BasicRasterDataset
       Implements System.IDisposable 
    Example
    Access the bands in a raster dataset
    var count = rasterDataset.GetBandCount();
    RasterBand rasterBandByName = rasterDataset.GetBandByName(sBandName);
    var index = rasterDataset.GetBandIndex(sBandName);
    
    // Get a RasterBand from the raster dataset
    RasterBand rasterBand = rasterDataset.GetBand(0);
    
    // Get the RasterBandDefinition from the raster band.
    RasterBandDefinition rasterBandDefinition = rasterBand.GetDefinition();
    // Get the name of the raster band from the raster band.
    string bandName = rasterBandDefinition.GetName();
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CoreObjectsBase
          ArcGIS.Core.Data.Dataset
             ArcGIS.Core.Data.Raster.BasicRasterDataset
                ArcGIS.Core.Data.Raster.RasterBand

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also