ArcObjects Library Reference (GeoDatabase)  

IRasterWorkspace2.CreateRasterDataset Method

Creates a RasterDataset in the workspace given its name.

[Visual Basic .NET]
Public Function CreateRasterDataset ( _
    ByVal Name As String, _
    ByVal Format As String, _
    ByVal Origin As IPoint, _
    ByVal columnCount As Integer, _
    ByVal RowCount As Integer, _
    ByVal cellSizeX As Double, _
    ByVal cellSizeY As Double, _
    ByVal numBands As Integer, _
    ByVal PixelType As rstPixelType, _
    [ByVal SpatialReference As ISpatialReference], _
    [ByVal Permanent As Boolean] _
) As IRasterDataset
[C#]
public IRasterDataset CreateRasterDataset (
    string Name,
    string Format,
    IPoint Origin,
    int columnCount,
    int RowCount,
    double cellSizeX,
    double cellSizeY,
    int numBands,
    rstPixelType PixelType,
    ISpatialReference SpatialReference,
    bool Permanent
);
[C#]

Optional Values

SpatialReference   Supply 0 as a default value.
Permanent   Supply true as a default value.
[C++]
HRESULT CreateRasterDataset(
  BSTR Name,
  BSTR Format,
  IPoint* Origin,
  long columnCount,
  long RowCount,
  double cellSizeX,
  double cellSizeY,
  long numBands,
  rstPixelType PixelType,
  ISpatialReference* SpatialReference,
  VARIANT_BOOL Permanent,
  IRasterDataset** RasterDataset
);
[C++]

Parameters

Name [in]   Name is a parameter of type BSTR Format [in]   Format is a parameter of type BSTR Origin [in]

  Origin is a parameter of type IPoint

columnCount [in]   columnCount is a parameter of type long RowCount [in]   RowCount is a parameter of type long cellSizeX [in]   cellSizeX is a parameter of type double cellSizeY [in]   cellSizeY is a parameter of type double numBands [in]   numBands is a parameter of type long PixelType [in]

  PixelType is a parameter of type rstPixelType

SpatialReference [in, optional, defaultvalue(0)]

  SpatialReference is a parameter of type ISpatialReference

Permanent [in, optional, defaultvalue(VARIANT_TRUE)]   Permanent is a parameter of type VARIANT_BOOL RasterDataset

  RasterDataset is a parameter of type IRasterDataset

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

CreateRasterDataset creates a file based raster dataset, the origin, width, and height of the raster dataset must be specified along with other required parameters, the raster dataset with the specified dimension and default pixel values will be created . The default pixel values of the raster dataset can be modified by writting pixel blocks to the dataset or mosaicking.

CreateRasterDataset can be used to create GRID, TIFF, ERDAS Imagine,BMP, Idrisi format,  and in memory raster. The strings used to specify formats are "GRID", "TIFF", "IMAGINE Image", "BMP", "RST", and "MEM" respectively. The strings are case-sensitive.

For GRID format, CreateRasterDataset only allows square cell size.

When creating an in memory raster, the file name can be an empty string.

 

 

 

 

See Also

IRasterWorkspace2 Interface

.NET Related Topics

DataSourcesRaster | How to create a raster dataset