ISaveAs.SaveAs Method

Creates a new persistent Dataset of a given format.

[VisualBasic.NET]
Public Function SaveAs ( _
ByValNameAsString,_
ByValWorkspaceAsIWorkspace,_
ByValFormatAsString _
)AsIDataset
[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]

Nameis a parameter of typeBSTR

Workspace[in]

Workspaceis a parameter of typeIWorkspace

Format[in]

Formatis a parameter of typeBSTR

Dataset[out,retval]

Datasetis a parameter of typeIDataset

Product Availability

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

Remarks

The format strings usedfor 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"

How to SaveAs raster data

Summary This article shows how to save a raster to varIoUs raster formats (save as),how to set up storage properties if saved to a geodatabase,and how to control pyramid building when saved as IMG,TIFF,GRID,and geodatabase formats.
Development licensing Deployment licensing
ArcView ArcView
ArcEditor ArcEditor
ArcInfo ArcInfo
Engine Developer Kit Engine Runtime
Additional Requirements
  • Add the following References to your Visual Studio project and the corresponding using (C#) or Imports (VB.NET) statements:
  • Imports ESRI.ArcGIS.DataSourcesGDB
  • Imports ESRI.ArcGIS.DataSourcesRaster
  • Imports ESRI.ArcGIS.Geodatabase
  • Imports ESRI.ArcGIS.esriSystem

Saving asraster data

By using theISaveAs interface,you can save araster datasetor a rasterinto many raster formats. You can also save to a geodatabase if the output workspace is one of the geodatabase workspaces. See the following code example:


[C#]DE>DE>

 

DE>

[VB.NET]DE>DE>

 
 
Turning off pyramid building
You can also turn off pyramid building for outputs,suchas IMG,and TIFF formats using theISaveAs2
interface. See the following code example:

[C#]DE>DE>

 
 

DE>

[VB.NET]DE>DE>

 
 

本文转自:http://changqingnew.blog.163.com/blog/static/1075233820103474425849/

相关文章

Format[$] ( expr [ , fmt ] ) format 返回变体型 format$ 强...
VB6或者ASP 格式化时间为 MM/dd/yyyy 格式,竟然没有好的办...
在项目中添加如下代码:新建窗口来显示异常信息。 Namespace...
转了这一篇文章,原来一直想用C#做k3的插件开发,vb没有C#用...
Sub 分列() ‘以空格为分隔符,连续空格只算1个。对所选...
  窗体代码 1 Private Sub Text1_OLEDragDrop(Data As Dat...