Question: How can I convert a vector dataset to a raster dataset using a text field in the vector data attribute table as assignment for cell values in the raster output dataset in ArcGIS?
Answer: Raster grids in ArcGIS need to use integer or floating points values for the "Value" attribute in the raster attribute table. Thus you can not 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 that has a unique numeric value for each unique text field value. For example, if you have a vector dataset with a text 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". The steps to do this in ArcGIS are described below:
1) Add a field to the vector attribute table (see How can I add a field to a table in ArcGIS?). Make sure this new field is defined as an integer field.
2) Recode the values for this new field according to the values in the text field.
In ArcMap open the attribute table for the vector dataset, select all the records/features with the first text value (e.g. "banana" or "residential" or whatever) by clicking on the Options menu and selecting Select by Attributes... Right-click on the top header record with the field name for the new integer field, select Calculate Values... This will open a dialog box where you can set the value for this new field for all the records you currently have selected - so you can just enter 1 in the dialog box. Proceed in this manner until you recode the new integer field for all the records. If you only have two unique text field values then you can just use the Options - Switch Selection to swap the selected sets. If you have more than two unique text field values then you'll have to select each one using the Select by Attributes... method. 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 How do I convert a vector dataset to a raster dataset in ArcGIS?)
Website
Copyright Tom Evans 2000
Last Updated 1/10/00
