ArcGIS Explorer Component Help |
Raster..::.Name Property |
Raster Class Example See Also |
Gets the name of the Raster.
Namespace:
ESRI.ArcGISExplorer.DataAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
Field Value
The name of the Raster.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