Show Navigation | Hide Navigation

Floating point and integer data

Release 9.1
Last modified April 18, 2005
E-mail This Topic Printable Version Give Us Feedback


Related Topics

About floating point and integer data

Integer raster data stores whole numbers as the values of each cell. Floating point raster data stores numbers with a decimal portion as the values of each cell. Integer values commonly represent categorical (discrete) data, and floating-point values commonly represent continuous surfaces. The graphics below show examples of floating-point (on the left) and integer (on the right) raster data. Note that when converting from floating-point to integer data, the values after the decimal point are simply truncated.

Graphic showing the conversion of floating point to integer data Gray colored cells represent NoData = NoData

Reasons to convert from floating-point data




How to convert from floating-point to integer data


Using the Int tool

  1. On the Standard toolbar, click the Show/Hide ArcToolbox button Show/Hide ArcToolbox Window to show ArcToolbox.
  2. Click the Index tab.
  3. Type "int (sa)" to locate the ArcGIS Spatial Analyst Int tool.
  4. Learn more about the Int tool
  5. In the list, double-click the tool to open its dialog box.
  6. Note that clicking Locate displays the location of the tool in the ArcToolbox Favorites list.
  7. In the table of contents, click the dropdown arrow and click the floating point layer to use as the input data. Alternatively, type the path to the input data on disk or click the Browse button to browse for the input data on disk.
  8. Type a name and location for the output integer raster, or click the Browse button to navigate to the location in which to save the result.
  9. Click OK.



Using Map Algebra via the Raster Calculator

  1. Add and enable the Spatial Analyst toolbar.
  2. Learn more about adding and enabling the Spatial Analyst toolbar
  3. Click the Spatial Analyst dropdown arrow and click Raster Calculator.
  4. In the Expression box, type
    Int([InRaster])

    where InRaster is your input floating-point raster.
  5. If InRaster is a layer in the table of contents, a path to the data is not required, but the name must be enclosed in square brackets []. If the raster data is not in the table of contents, the path to the data on disk must be provided. For example,
    Int(C:\data\InRaster)


  6. Click Evaluate.


Tip

  • Multiply input data by 100 to retain data values past the decimal point. When converting to integer, values past the decimal point are truncated. If all values are in the range 0 to 1 (for example, 0.3), and you convert to integer, all values will be 0 unless you multiply the values by 100 first. You must remember that any values then used in analysis must be divided by 100 to obtain the correct result.


Using the Single Output Map Algebra tool

  1. On the Standard toolbar, click the Show/Hide ArcToolbox button Show/Hide ArcToolbox Window to show ArcToolbox.
  2. Click the Index tab.
  3. Type "Single Output Map Algebra (sa)" to locate the tool.
  4. Learn more about the Single Output Map Algebra tool
  5. Double-click the tool in the list to open its dialog box.
  6. Note that clicking Locate displays the location of the tool in the ArcToolbox Favorites list.
  7. In the Expression box, type
    Int(C:\Data\InRaster)

    where InRaster is your input floating-point raster, then click OK.
  8. Alternately, if InRaster is a layer in the table of contents, expand the Input raster or feature data to show in ModelBuilder (optional) subsection and drag the layer into the list. Type "Int(" then drag the layer from the list into the Expression box. Close the brackets so your expression resembles:
    Int(InRaster)

    Type a name for the output raster and click OK.


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