ArcObjects Library Reference (GeoDatabase)  

ISaveAs.SaveAs Method

Creates a new persistent Dataset of a given format.

[Visual Basic .NET]
Public Function SaveAs ( _
    ByVal Name As String, _
    ByVal Workspace As IWorkspace, _
    ByVal Format As String _
) As IDataset
[C#]
public IDataset SaveAs (
    string Name,
    IWorkspace Workspace,
    string Format
);
[C++]
HRESULT SaveAs(
  BSTR Name,
  IWorkspace* Workspace,
  BSTR Format,
  IDataset** Dataset
);
[C++]

Parameters

Name [in]   Name is a parameter of type BSTR Workspace [in]

  Workspace is a parameter of type IWorkspace

Format [in]   Format is a parameter of type BSTR Dataset [out, retval]

  Dataset is a parameter of type IDataset

Product Availability

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

Remarks

The format strings used for the supported formats are below, and they are case sensitive:

Format Name String Used
Imagine "IMAGINE Image"
TIFF "TIFF"
GRID "GRID"
JPEG "JPG"
JP2000 "JP2"
BMP "BMP"
PNG "PNG"
GIF "GIF"
PCI Raster "PIX"
X11 Pixmap "XPM"
PCRaster "MAP"
Memory Raster "MEM"
HDF4 "HDF4"
BIL "BIL"
BIP "BIP"
BSQ "BSQ"
Idrisi Raster Format "RST"
ENVI Raster Format "ENVI"
Geodatabase Raster "GDB"
 

 

 

Note, SaveAs will return a RasterDataset, to prevent from ISaveAs holding the output, .NET ReleaseCOMObject needs to be called to release the referene to the output raster dataset:

    System.Runtime.InteropServices.Marshal.ReleaseComObject(outRasterDS);

 

See Also

ISaveAs Interface

.NET Samples

Mosaic raster datasets to a file raster format (Code Files: CreateFileRasterMosaic) | Create a custom NoData pixel filter (Code Files: TestApp)

.NET Related Topics

Data processing in spatial analysis operations | DataSourcesRaster | Executing a map algebra expression | Geodatabase | How to create a custom convolution filter | How to create an image server layer | How to pan sharpen an image | How to save a function raster dataset into a raster dataset | How to save raster data and set storage properties | How to set raster properties when saving as a raster | How to split a raster dataset into multiple tiles