This document is archived and information here might be outdated.  Recommended version.


IRasterWorkspaceEx.CreateRasterDataset Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (GeoDatabase)  

IRasterWorkspaceEx.CreateRasterDataset Method

Creates a new raster dataset.

[Visual Basic .NET]
Public Function CreateRasterDataset ( _
    ByVal Name As String, _
    ByVal numBands As Integer, _
    ByVal PixelType As rstPixelType, _
    ByVal StorageDef As IRasterStorageDef, _
    ByVal ConfigKeyword As String, _
    ByVal RasterDef As IRasterDef, _
    ByVal GeometryDef As IGeometryDef _
) As IRasterDataset
[C#]
public IRasterDataset CreateRasterDataset (
    string Name,
    int numBands,
    rstPixelType PixelType,
    IRasterStorageDef StorageDef,
    string ConfigKeyword,
    IRasterDef RasterDef,
    IGeometryDef GeometryDef
);
[C++]
HRESULT CreateRasterDataset(
  BSTR Name,
  long numBands,
  rstPixelType PixelType,
  IRasterStorageDef* StorageDef,
  BSTR ConfigKeyword,
  IRasterDef* RasterDef,
  IGeometryDef* GeometryDef,
  IRasterDataset** Dataset
);
[C++]

Parameters Name [in] Name is a parameter of type BSTR numBands [in] numBands is a parameter of type long PixelType [in]
PixelType is a parameter of type rstPixelType StorageDef [in]
StorageDef is a parameter of type IRasterStorageDef ConfigKeyword [in] ConfigKeyword is a parameter of type BSTR RasterDef [in]
RasterDef is a parameter of type IRasterDef GeometryDef [in]
GeometryDef is a parameter of type IGeometryDef Dataset [out, retval]
Dataset is a parameter of type IRasterDataset

Product Availability

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

Description

The CreateRasterDataset method creates a new empty raster dataset in the geodatabase, whereby it is basically a placeholder for some attributes of a raster dataset, such as the number of bands, pixel type, RASTER column properties, and GEOMETRY column properties.  Once you have created an empty raster dataset in the geodatabase, you can append raster data to it by mosaicking. If the GeometryDef argument is not specified, a default GeometryDef will be created using the according values (for example, spatial reference) set in the RasterDef argument. Since the geometry column is not accessed or updated, there is no need to set the GeometryDef when creating a raster dataset.

If cellsize in the RasterStorageDef is not specified or set to NULL, the new raster dataset will have an undefined cellsize, the cellsize will be set to the cellsize of the first raster that is mosaicked to it.

If spatial reference in the RasterDef is not specified or set to NULL, the new raster dataset will have an unknown spatial reference, the spatial reference will be set to the spatial reference of the first raster that is mosaicked to it.

See Also

IRasterWorkspaceEx Interface

.NET Related Topics

How to create a raster dataset