Float To Raster (Conversion) |
|
Release 9.2
Last modified April 2, 2008 |
![]() ![]() ![]() Print all topics in : "Tools" |
Converts a file of binary floating-point values representing raster data to a raster dataset.
Usage tips
Command line and Scripting
The input file is an IEEE floating-point format, 32-bit signed binary file.
Two inputs are required: the binary floating-point file with a .flt extension (<in_float_file>.flt) and an ASCII header file with a .hdr extension (<in_float_file>.hdr). You only specify the .flt file; however, there needs to be an existing .hdr file in the same directory with the same 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>
Note: xxx is a number and the keyword nodata_value is optional.
The BYTEORDER represents how multibyte binary numbers are stored on the system the binary file was generated on. On Intel-based systems, the byte order is MSBFIRST (also known as big endian). On most other architectures (Macintosh and all UNIX platforms except Alpha), the byte order is LSBFIRST (also known as little endian).
The NODATA_VALUE is the value in the input file that determines which cells should be assigned the value of NoData in the output raster. NoData is normally reserved for those cells whose true value is unknown.
In a floating-point binary file, the values are written as binary 32-bit signed floating-point numbers. The first record of the file corresponds to the first row of the raster. Going from left to right, the first 32 bits are the first cell, the next 32 bits are the second cell, and so on, to the end of the record (row). This is repeated for the second record (the second row of the raster) and all the way until the last record (the bottom row of the raster).
Float To Raster supports LLCORNER and LLCENTER for determining the origin. Raster To Float only writes the origin as LLCORNER.
The following environments affect this tool: current workspace, scratch workspace, output coordinate system, output extent, output has Z values, Z resolution, output CONFIG keyword, output spatial grid 1,2,3, output XY domain, output Z domain, pyramid, raster statistics, compression, and tile size.
Command line syntax
An overview of the Command Line window
FloatToRaster_conversion <in_float_file> <out_raster>
Parameter | Explanation | Data Type |
<in_float_file> |
The input floating-point binary file. The file must have a .flt extension. There must be a header file in association with the floating-point binary file, with a .hdr extension. |
File |
<out_raster> |
The raster dataset to be created. When not saving to a geodatabase, specify .tif for a TIFF file format, .img for an ERDAS IMAGINE file format, or no extension for a GRID file format. |
Raster Dataset |
FloatToRaster_conversion d:\data\whitehorse.mdb\elevation.flt d:\data\rasterdata.mdb\elevation
Scripting syntax
About getting started with writing geoprocessing scripts
FloatToRaster_conversion (in_float_file, out_raster)
Parameter | Explanation | Data Type |
in_float_file (Required) |
The input floating-point binary file. The file must have a .flt extension. There must be a header file in association with the floating-point binary file, with a .hdr extension. |
File |
out_raster (Required) |
The raster dataset to be created. When not saving to a geodatabase, specify .tif for a TIFF file format, .img for an ERDAS IMAGINE file format, or no extension for a GRID file format. |
Raster Dataset |
# FloatToRaster_sample.py # Description: # Converts a file of binary floating point values # representing raster data to a raster. # Requirements: None # Author: ESRI # Date: Oct 20, 2005 # Import system modules import arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create() try: # Set local variables InFloatFile = "C:/data/example.flt" OutRaster = "C:/data/raster1" # Process: FloatToRaster_conversion gp.FloatToRaster_conversion(InFloatFile, OutRaster) except: # Print error message if an error occurs print gp.GetMessages()
Map Algebra syntax
See FloatGrid.
ArcObjects syntax
See ImportFromFloat.