ARCHIVED: In ArcGIS, how do I convert a shapefile to a raster using a numeric field in the vector data attribute table?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

Raster grids in ArcGIS need to use integer or floating-point values for the "Value" attribute in the raster attribute table. Thus, you cannot use a text field in a vector attribute table for the cell assignment in converting vector data to raster data. If you have a small set of different text field values, an easy way around this vector-raster conversion limitation is to add a new field to the vector data that is a numeric field with a unique numeric value for each unique text field value. For example, if you have a vector dataset with a test attribute and the only field values are "banana" and "mango", you can add a new integer field to this table where each feature/record has a value of 1 for "banana" and 2 for "mango".

To do this in ArcGIS:

  1. Add a field to the vector attribute table; see Fundamentals of adding and deleting fields from ArcGIS Help 10.2. Recode the values for this new field according to the values in the text field.
  2. In ArcMap, open the attribute table for the vector dataset. From the Options menu, choose Select by Attributes, and then right-click the top header record with the field name for the new integer field. Select Calculate Values.
  3. In the dialog box that opens, you can set the value for the new field for all the records you currently have selected. For example, enter 1 for "banana" in the dialog box.
  4. Proceed in this manner until you have recoded the new integer field for all records. If you have only two unique text field values, you can open the Options menu and select Switch Selection to swap the selected sets. If you have more than two unique text field values, you must select each one using the Select by Attributes method.
  5. Once you have recoded all the records, you can use this new integer text field for the "Features to Raster" conversion in the Spatial Analyst toolbar; see An overview of the To Raster toolset from ArcGIS Help 10.1.

This is document andd in the Knowledge Base.
Last modified on 2023-05-09 14:40:12.