CÓMO

Convertir un ráster de tipo flotante a una clase de entidad poligonal y conservar los valores decimales

Last Published: April 19, 2024

Resumen

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

Procedimiento

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 by 10 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 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.
The Raster Calculator window displaying the Map Algebra expression box containing the raster multiplied by 1000000.
  1. Using the Int tool, convert the floating type raster to an integer type raster.
    1. Navigate to ArcToolbox > Spatial Analyst Tools > Math > Int.
    2. In the Int window, specify the raster created in Step 1 in the Input raster or constant value field.
    3. Specify the name and location for the output raster.
    4. Click OK.
The Int window displaying the Input raster or constant value and Output raster parameters.
  1. 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. In the Raster to Polygon window, specify 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.
The Raster to Polygon window displaying the specified Input raster and Output polygon features parameters.
  1. Divide the polygon feature class by 10, as used in Step 1, to get the original decimal values.
    1. Right-click the output feature layer from Step 3 and click Open Attribute Table.
    2. Click the Table Options drop-down arrow and click Add Field.
The attribute table displaying the Table Options drop-down menu, and the option to add field.
  1. Fill in the parameters in the Add Field window and click OK.
The Add Field window displaying the Name, Type and Field Properties parameters.
  1. Right-click the heading of the new field and click Field Calculator.
The attribute table displaying the created field. Right-clicking the new field header displays the Field Calculator option.
  1. In the Fields section, double-click the gridcode field with the multiple of 10 used in Step 1 and click OK.
The Field Calculator window dsplaying the expression of gridcode divided by 1000000.

Id. de artículo:000012554

Obtener ayuda de expertos en ArcGIS

Contactar con soporte técnico

Descargar la aplicación de soporte de Esri

Ir a las opciones de descarga

Información relacionada

Descubrir más sobre este tema