Show Navigation | Hide Navigation
You are here:
Extensions > Spatial Analyst > Spatial Analyst functional reference > Conversion (Spatial Analyst)

ImportFromFloat

Release 9.2
Last modified January 3, 2008
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Conversion (Spatial Analyst)"


Related Topics

Converts a file of binary floating-point numbers to a raster.


Usage tips

Command line syntax
See Float to Raster

Scripting syntax
See Float to Raster

Map Algebra syntax
See FloatGrid

ArcObjects syntax
IRasterConversionOp::ImportFromFloat (floatFile As String, OutWorkspace As IWorkspace, outRasterName As String, OutRasterFormat As String) As IRasterDataset

Parameter Explanation
floatFile An input floating-point binary file.
OutWorkspace An object specifying the directory or subdirectory to contain the output raster dataset.
outRasterName The name of the output raster.
OutRasterFormat ESRI GRID, ERDAS IMAGINE, or TIFF formats are supported. The strings for outRasterFormat are GRID, IMAGINE Image, and TIFF respectively. 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 a .tif extension. ArcGIS also supports the TIFF format with .tiff and .tff extensions. A format string TIF creates a TIFF file with a .tiff extension, and a format string TFF creates a TIFF file with a .tff extension.
The format string IMAGINE Image creates a raster output with a .img file extension.

ArcObjects example

' Imports a Float GRID file into a RasterDataset.
' Member of esriGeoAnalyst.IRasterImportOp.
'
' Function ImportFromFloat(ByVal asciiFile As String, _ 
'    ByVal OutWorkspace As esriGeoDatabase.IWorkspace, 
'    ByVal outRasterName As String, ByVal OutRasterFormat As String, _
'    ByVal isInteger As Boolean) As esriGeoDatabase.IRasterDataset

Dim pRasterImportOp As IRasterImportOp
Set pRasterImportOp = New RasterConversionOp

Dim pRasterWS As IWorkspace
Dim pRasterWSFact As IWorkspaceFactory
Set pRasterWSFact = New RasterWorkspaceFactory
Set pRasterWS = pRasterWSFact.OpenFromFile("c:\myDirectory"", 0)

Dim pRasOut As IRasterDataset
Set pRasOut = pRasterImportOp.ImportFromASCII("inFile.flt", pRasterWS, "mrGrid", "GRID", True)

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.