Returns a Raster object which represents a raster dataset stored in a file geodatabase.

Namespace:  ESRI.ArcGISExplorer.Data

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public static Raster OpenFileGeodatabaseRaster(
	string pathToGeodatabase,
	string name
)
Visual Basic (Declaration)
Public Shared Function OpenFileGeodatabaseRaster ( _
	pathToGeodatabase As String, _
	name As String _
) As Raster

Parameters

pathToGeodatabase
Type: System..::.String

The path to the file geodatabase, including file extension (".gdb").
name
Type: System..::.String

The name of the raster to open. For ArcSDE geodatabases fully qualify the raster name where required (e.g. "owner.rastername" or "database.owner.rastername").

Return Value

A Raster object which represents a geodatabase raster.

Remarks

This is a convenience method which is useful for opening a small number of rasters, consider using the Geodatabase.OpenRaster method instead when opening many rasters

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#
{
  //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);
  }      
}
CopyVB.NET
'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