English

How To: Convert a floating type raster to a polygon feature class and retain the decimal values

Summary

The Raster to Polygon tool can only process integer input rasters. Hence, a floating type raster must be converted to an integer type raster before using the tool.

Procedure

 

Note:
The following workflow requires a Spatial Analyst license. The Int tool mentioned in this article exists in both the Spatial Analyst and 3D Analyst toolsets.

The instructions provided describe how to convert a floating type raster to a polygon feature class and retain the decimal values.
  1. Using the Raster Calculator tool, multiply the raster with a multiple of 10 required to remove the decimal values. For example, multiply a raster by 1000 if the raster values contain three decimal places, and by 100 if the values contain two decimal places.
    1. Navigate to ArcToolbox > Spatial Analyst Tools > Map Algebra > Raster Calculator.
    2. In the Layers and variables section, double-click the desired raster.
    3. Click the multiplication sign (*).
    4. Input the required multiple of 10. In this example, 1000000 is used because the raster contains floating values with six decimal places.
    5. Click OK.

      [O-Image]
  2. Using the Int tool, convert the floating type raster to an integer type raster.
    1. Navigate to ArcToolbox > Spatial Analyst Tools > Math > Int.
    2. Drag and drop the raster created in Step 1 as the input raster.
    3. Specify the name and location for the output raster.
    4. Click OK.

      [O-Image]
  3. Convert the integer type raster to a polygon feature class using the Raster to Polygon tool.
    1. Navigate to ArcToolbox > Conversion Tools > From Raster > Raster to Polygon.
    2. Drag and drop the raster created in Step 2 in the Input raster field.
    3. Specify the name and location for the output polygon feature class.
    4. Fill in any optional parameters.
    5. Click OK.

      [O-Image]
  4. Divide the polygon feature class by the multiple of 10 used in Step 1 to get the original decimal values.
    1. Right-click the output feature layer from Step 3 > Edit Features > Start Editing.
    2. Right-click the polygon feature layer > Open Attribute Table.
    3. Click the Table Options drop-down arrow > Add Field.
      [O-Image]
       
    4. Fill in the parameters in the Add Field window, and click OK.

      [O-Image]
       
    5. Right-click the heading of the new field > Field Calculator.

      [O-Image]
       
    6. In the Fields section, double-click the gridcode field with the multiple of 10 used in Step 1, and click OK.

      [O-Image]

Related Information