ArcGIS Explorer Component Help |
Raster..::.OpenArcSDERaster Method (ArcSDEConnectionProperties, String) |
Raster Class Example See Also |
Returns a Raster object which represents a raster dataset stored in an ArcSDE geodatabase.
Namespace:
ESRI.ArcGISExplorer.DataAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public static Raster OpenArcSDERaster( ArcSDEConnectionProperties connectionProperties, string name ) |
Visual Basic (Declaration) |
---|
Public Shared Function OpenArcSDERaster ( _ connectionProperties As ArcSDEConnectionProperties, _ name As String _ ) As Raster |
Parameters
- connectionProperties
- Type: ESRI.ArcGISExplorer.Data..::.ArcSDEConnectionProperties
An ArcSDEConnectionProperties object which contains the information required to make a connection to a geodatabase.
- name
- Type: System..::.String
The fully qualified name of the raster (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 tables.
Examples
The code below opens a ArcSDE geodatabase raster using the OpenArcSDERaster method, then prints the Name and ShortName properties.
CopyC#
{ //Open an Oracle ArcSDE geodatabase raster called SOUTHGORMS_HO, //owned by a user called scotadmin which is stored in the SDE.DEFAULT version ArcSDEConnectionProperties conn = new ArcSDEConnectionProperties("serverName", "5151", "scotuser", "scotuser"); Raster mtnRaster = Raster.OpenArcSDERaster(conn, "SCOTADMIN.SOUTHGORMS_HO"); //Print the name of the raster System.Diagnostics.Debug.Print(mtnRaster.Name); //Prints "SCOTADMIN.SOUTHGORMS_HO" //Print the short name of the raster System.Diagnostics.Debug.Print(mtnRaster.ShortName); //Prints "SOUTHGORMS_HO" }
CopyVB.NET
'Open an Oracle ArcSDE geodatabase raster called SOUTHGORMS_HO, 'owned by a user called scotadmin which is stored in the SDE.DEFAULT version Dim conn As ArcSDEConnectionProperties = New ArcSDEConnectionProperties("serverName", "5151", "scotuser", "scotuser") Dim mtnRaster As Raster = Raster.OpenArcSDERaster(conn, "SCOTADMIN.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