IRasterWorkspace2 Interface

Provides access to members that control an improved raster workspace.

When To Use

IRasterWorkspace2interface allows to create a raster dataset in addition to the functionalities provided by the IRasterWorkspaceinterface.

Members

Name Description
Method CanCopy Indicates if this dataset can be copied.
Method Copy Copies this workspace to a new workspace with the specified name.
Method CreateRasterDataset Creates a RasterDataset in the workspace given its name.
Method IsWorkspace Indicates if the file path specified is a raster workspace.
Method OpenRasterDataset Opens a RasterDataset in the workspace given its name.

IRasterWorkspace2.CanCopy Method

Indicates if this dataset can be copied.

Public Function CanCopy ( _
) As Boolean
public bool CanCopy (
);

IRasterWorkspace2.Copy Method

Copies this workspace to a new workspace with the specified name.

Public Function Copy ( _
    ByVal copyName As String, _
    ByVal copyWorkspace As IWorkspace _
) As IDataset
public IDataset Copy (
    string copyName,
    IWorkspace copyWorkspace
);

Remarks

Not implemented.

IRasterWorkspace2.CreateRasterDataset Method

Creates a RasterDataset in the workspace given its name.

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
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
);

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.

IRasterWorkspace2.IsWorkspace Method

Indicates if the file path specified is a raster workspace.

Public Function IsWorkspace ( _
    ByVal Name As String _
) As Boolean
public bool IsWorkspace (
    string Name
);

IRasterWorkspace2.OpenRasterDataset Method

Opens a RasterDataset in the workspace given its name.

Public Function OpenRasterDataset ( _
    ByVal Name As String _
) As IRasterDataset
public IRasterDataset OpenRasterDataset (
    string Name
);

Remarks

OpenRasterDataset opens a RasterDataset from a supported file based raster format, such as GRID, Imagine, BMP, TIFF, etc.

Classes that implement IRasterWorkspace2

Classes Description
RasterWorkspace (esriDataSourcesRaster) The raster workspace object.

Remarks

IRasterWorspace2 is used to access a raster stored in a file system in any supported raster format. To access raster from geodtabase, use IRasterWorkspaceEx interface.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.