Gets the number of columns in the Raster.

Namespace:  ESRI.ArcGISExplorer.Data

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

Syntax

C#
public int ColumnCount { get; }
Visual Basic (Declaration)
Public ReadOnly Property ColumnCount As Integer

Field Value

The number of columns.

Examples

The code below opens a file-based raster using the OpenRasterFile method then prints out its dimensions, including the number of columns it contains using the ColumnCount property.
CopyC#
{
  //Open a file-based (Mr. Sid) raster
  Raster demRaster = Raster.OpenRasterFile(@"\\leven\Data\Yellowstone\dem.sid");

  //Print out the dimensions of the Raster
  System.Drawing.Size cellSize = demRaster.CellSize;
  System.Diagnostics.Debug.Print(string.Format("Cell Size: {0}x{1}",cellSize.Height.ToString(), cellSize.Width.ToString()));
  System.Diagnostics.Debug.Print("Rows:" + demRaster.RowCount.ToString());
  System.Diagnostics.Debug.Print("Columns:" + demRaster.ColumnCount.ToString());
}
CopyVB.NET
'Open a file-based (Mr. Sid) raster
Dim demRaster As Raster = Raster.OpenRasterFile("\\leven\Data\Yellowstone\dem.sid")

'Print out the dimensions of the Raster
Dim cellSize As System.Drawing.Size = demRaster.CellSize
System.Diagnostics.Debug.Print(String.Format("Cell Size: {0}x{1}", cellSize.Height.ToString(), cellSize.Width.ToString()))
System.Diagnostics.Debug.Print("Rows:" + demRaster.RowCount.ToString())
System.Diagnostics.Debug.Print("Columns:" + demRaster.ColumnCount.ToString())

See Also