Returns a Raster object which represents a raster dataset stored in an ArcSDE 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 OpenArcSDERaster(
	string pathToSdeFile,
	string name
)
Visual Basic (Declaration)
Public Shared Function OpenArcSDERaster ( _
	pathToSdeFile As String, _
	name As String _
) As Raster

Parameters

pathToSdeFile
Type: System..::.String

The path to spatial database connection file, including file extension (".sde").
name
Type: System..::.String

The fully qualified name of the raster to open (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 ArcSDE geodatabase raster using the OpenArcSDERaster method, then prints the Name and ShortName properties.
CopyC#
{

  //The raster is stored in an SQL Server Express geodatabase so check that direct connect is possible
  if (ArcSDEConnectionProperties.CanUseDirectConnect == true)
  {
    //Open a ArcSDE geodatabase raster 
    Raster mtnRaster = Raster.OpenArcSDERaster(@"C:\Data\SQLServer.sde", "SDE.DBO.SOUTHGORMS_HO");

    //Print the name of the raster
    System.Diagnostics.Debug.Print(mtnRaster.Name);       //Prints "SDE.DBO.SOUTHGORMS_HO"
    //Print the short name of the raster
    System.Diagnostics.Debug.Print(mtnRaster.ShortName);  //Prints "SOUTHGORMS_HO"
  }
}
CopyVB.NET
'The raster is stored in an SQL Server Express geodatabase so check that direct connect is possible
If ArcSDEConnectionProperties.CanUseDirectConnect = True Then

  'Open a ArcSDE geodatabase raster
  Dim mtnRaster As Raster = Raster.OpenArcSDERaster("C:\Data\SQLServer.sde", "SDE.DBO.SOUTHGORMS_HO")

  'Print the name of the raster
  System.Diagnostics.Debug.Print(mtnRaster.Name)       'Prints "SDE.DBO.SOUTHGORMS_HO"
  'Print the short name of the raster
  System.Diagnostics.Debug.Print(mtnRaster.ShortName)  '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

End If

See Also