ArcObjects Library Reference (GeoAnalyst)  

IRasterImportOp.ImportFromASCII Method

Imports a GRID ASCII file into a RasterDataset.

[Visual Basic .NET]
Public Function ImportFromASCII ( _
    ByVal asciiFile As String, _
    ByVal OutWorkspace As IWorkspace, _
    ByVal outRasterName As String, _
    ByVal OutRasterFormat As String, _
    ByVal isInteger As Boolean _
) As IRasterDataset
[C#]
public IRasterDataset ImportFromASCII (
    string asciiFile,
    IWorkspace OutWorkspace,
    string outRasterName,
    string OutRasterFormat,
    bool isInteger
);
[C++]
HRESULT ImportFromASCII(
  BSTR asciiFile,
  IWorkspace* OutWorkspace,
  BSTR outRasterName,
  BSTR OutRasterFormat,
  VARIANT_BOOL isInteger,
  IRasterDataset** ppOut
);
[C++]

Parameters

asciiFile [in]   asciiFile is a parameter of type BSTR OutWorkspace [in]

  OutWorkspace is a parameter of type IWorkspace

outRasterName [in]   outRasterName is a parameter of type BSTR OutRasterFormat [in]   OutRasterFormat is a parameter of type BSTR isInteger [in]   isInteger is a parameter of type VARIANT_BOOL ppOut [out, retval]

  ppOut is a parameter of type IRasterDataset

Product Availability

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

Remarks

asciiFile

The input ASCII file to be converted. The ASCII file must consist of header information of specific format.

OutWorkspace

an object specifying the directory or subdirectory to contain the output raster dataset

outRasterName

The name of the output raster dataset to be created

OutRasterFormat

ESRI GRID, ERDAS Imagine or TIFF formats are supported. The strings for outRasterFormat are "GRID", "IMAGINE Image" and "TIFF" respectively and they are case sensitive.

The format string GRID creates an output ESRI GRID with no file extension

The format string "TIFF" creates a TIFF file with ".tif" extension. ArcGIS also supports TIFF format with ".tiff" and ".tff" extensions. A format string "TIF" creates a TIFF file with ".tiff" extention and a format string "TFF" creates a TIFF file with ".tff" extension

The format string IMAGINE Image creates a raster output with .img file extension

isInteger

A Boolean specifying the data type of the output raster

If TRUE, an integer raster will be created

If FALSE, a floating-point raster will be created

See Also

IRasterImportOp Interface