Raster to Float (Conversion) |
|
Release 9.2
Last modified April 2, 2008 |
![]() ![]() ![]() Print all topics in : "Tools" |
Converts a raster dataset to a file of binary floating-point values representing raster data.
Usage tips
Command line and Scripting
The input can be any valid raster dataset.
Two outputs are created: an IEEE floating-point format 32-bit signed binary file with a .flt extension and an ASCII header file named with a .hdr extension. Both will use the same output floating-point raster file name.
The ASCII file consists of header information containing a set of keywords. The file format is
NCOLS xxx NROWS xxx XLLCENTER xxx | XLLCORNER xxx YLLCENTER xxx | YLLCORNER xxx CELLSIZE xxx NODATA_VALUE xxx BYTEORDER <MSBFIRST | LSBFIRST>where xxx is a number and the keyword NODATA_VALUE is always written as -9999. The BYTEORDER represents how multibyte binary numbers are stored on the system on which the binary file was generated. On Intel-based systems, the byte order is MSBFIRST (also known as Big Endian). On most other architectures (Macintosh and all UNIX systems except Alpha), the byte order is LSBFIRST (also known as Little Endian).
The NODATA_VALUE is the value in the output file assigned to those cells in the input raster that contain NoData. This value is normally reserved for those cells whose true value is unknown.
By default, NoData values on the input raster will have a value of -9999 in the output float file. If you want to use another value to represent NoData, a procedure similar to the following can be applied:
This tool only writes the origin as LLCORNER. The Float To Raster tool will support LLCENTER in addition to LLCORNER.
The following environments affect this tool: current workspace, scratch workspace, output coordinate system, and output extent.
Command line syntax
An overview of the Command Line window
RasterToFloat_conversion <in_raster> <out_float_file>
Parameter | Explanation | Data Type |
<in_raster> |
The input raster dataset. The raster can be integer or floating point. |
Composite Geodataset |
<out_float_file> |
The output floating-point raster file. The file name must have a .flt extension. |
File |
RasterToFloat c:\data\images.mdb\landuse.tif c:\data\landuse.flt
Scripting syntax
About getting started with writing geoprocessing scripts
RasterToFloat_conversion (in_raster, out_float_file)
Parameter | Explanation | Data Type |
in_raster (Required) |
The input raster dataset. The raster can be integer or floating point. |
Composite Geodataset |
out_float_file (Required) |
The output floating-point raster file. The file name must have a .flt extension. |
File |
# RasterToFloat_sample.py # Description: # Converts a raster into a file of binary floating point. # Requirements: None # Author: ESRI # Date: Oct 20, 2005 # Import system modules import arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create() try: # Set local variables InRaster = "C:/data/raster1" OutFloatFile = "C:/data/raster2float.flt" # Process: RasterToFloat_conversion gp.RasterToFloat_conversion(InRaster, OutFloatFile) except: # Print error message if an error occurs print gp.GetMessages()
Map Algebra syntax
See GridFloat.
ArcObjects syntax
See ExportToFloat.