com.esri.arcgis.geodatabase
Interface ISaveAs

All Superinterfaces:
Serializable
All Known Subinterfaces:
ISaveAs2
All Known Implementing Classes:
MosaicRaster, Raster, RasterDataset, RenderedRaster

public interface ISaveAs
extends Serializable

Provides access to methods for saving as a new Dataset.

Superseded By

ISaveAs2

Description

The ISaveAs interface saves a raster or raster dataset to an output raster dataset in one of the supported raster formats.

Product Availability

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

See Also:
MosaicRaster

Method Summary
 boolean canSaveAs(String format)
          Checks if it's can be saved as a new persistent Dataset of a given format.
 IDataset saveAs(String name, IWorkspace workspace, String format)
          Creates a new persistent Dataset of a given format.
 

Method Detail

saveAs

IDataset saveAs(String name,
                IWorkspace workspace,
                String format)
                throws IOException,
                       AutomationException
Creates a new persistent Dataset of a given format.

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
workspace - A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
format - The format (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canSaveAs

boolean canSaveAs(String format)
                  throws IOException,
                         AutomationException
Checks if it's can be saved as a new persistent Dataset of a given format.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
format - The format (in)
Returns:
The canSaveAs
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.