Gets the number of bands that make up the Raster.
Namespace:
ESRI.ArcGISExplorer.Data
Assembly:
ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.900 (2.0.0.900)
Syntax
C# |
---|
public int BandCount { get; } |
Visual Basic (Declaration) |
---|
Public ReadOnly Property BandCount As Integer |
Field Value
The number of bands.
Examples
The code below opens a file geodatabase raster using the OpenFileGeodatabaseRaster method, then
returns a count of the constituent raster bands and prints out their names.
CopyC#
CopyVB.NET

{ //Open file geodatabase raster Raster mtnRaster = Raster.OpenFileGeodatabaseRaster(@"C:\Data\Scotland.gdb", "SOUTHGORMS_HO"); //Find out how many bands the raster is composed of int bandCount = mtnRaster.BandCount; //Print out the raster band names foreach (string bandName in mtnRaster.GetBandNames()) { System.Diagnostics.Debug.Print(bandName); } }

'Open a file geodatabase raster Dim mtnRaster As Raster = Raster.OpenFileGeodatabaseRaster("C:\Data\Scotland.gdb", "SOUTHGORMS_HO") 'Print the name of the raster System.Diagnostics.Debug.Print(mtnRaster.Name) 'Prints "SOUTHGORMS_HO" 'Find out how many bands the raster is composed of Dim bandCount As Integer = mtnRaster.BandCount 'Print out the raster band names For Each bandName As String In mtnRaster.GetBandNames() System.Diagnostics.Debug.Print(bandName) Next
See Also
Relate Topics:
CellSize Property
ColumnCount Property
CoordinateSystem Property
Extent Property
HasPyramids Property
Name Property
RootDataContainer Property
RowCount Property
ShortName Property
CellSize Property
ColumnCount Property
CoordinateSystem Property
Extent Property
HasPyramids Property
Name Property
RootDataContainer Property
RowCount Property
ShortName Property
Created by Atop CHM to web converter,© 2009 all right reserved.