A geodatabase feature class or table can have one attribute field that contains a raster dataset. Unlike a hyperlink that simply links a feature's attribute field to an image, an attribute field of type Raster stores the raster data within or alongside the geodatabase. For example, you could add a photograph of the commercial property as an attribute of a parcel feature.
To create a feature class containing an attribute field that holds raster datasets, do the following:
- Add a field of type Raster to the attribute table.
- In ArcMap, start an edit session.
- Edit the field to insert the raster dataset.
Only appropriate raster imagery should be added as an attribute to a feature class. All ArcGIS software-supported raster dataset formats are available, but it is highly recommended that only small pictures be used for this field.
Only one field of type raster can be used in each feature class or table. Use a different table with a related field to associate more than one raster dataset with each feature.
A shapefile cannot contain an attribute field to hold raster datasets. In this case, it would be advantageous to use a hyperlink.
Another way to associate a raster with a feature class is using attachments. This is recommended, especially if you want to attach more than one.
Learn about enabling attachments on a feature class.
Add a field of type Raster
You can access the attribute table of a geodatabase feature class in any ArcGIS Desktop application. Using the Table window or view, you can add a new field.
To add a field of type Raster in ArcMap, open the attribute table, click the Table Options button , then click Add Field. On the Add Field dialog box, choose Raster from the Type drop-down list and enter the other relevant information.
Learn more about adding fields to tables.
To add a field in ArcCatalog, use the following steps:
- Click a feature class within a geodatabase.
- Click the Preview tab.
- Click the Preview drop-down arrow and click Table.
- Click the Table Options button and click Add field.
- Type a Name for the new field of type raster.
- Click the Type drop-down arrow and click Raster.
- Edit any of the properties that may need editing.
- If you want the raster to be ingested and managed by the geodatabase set Managed By GDB to Yes. If you want the raster to be maintained outside the geodatabase in a folder you maintain, set Managed By GDB to No.
- Click OK.
Updating attributes of type raster
- Add to ArcMap a feature class containing a raster field.
- Click the Editor Toolbar button on the Standard toolbar.
- Click the Editor menu on the Editor toolbar and click Start Editing.
- Click the Edit tool on the Editor toolbar and click the feature.
- Click the Attributes button on the Editor toolbar.
- Click the attribute field containing the rasters.
- Click the drop-down arrow and click Load.
- Click the Input Raster Dataset browse button and navigate to the location of the raster dataset.
- Click Add.
The dialog will close if the raster field is unmanaged and the image will be displayed in the Attributes window.
- If the raster field you created is managed, you can choose a compression method and value, then click OK.
Since the raster dataset is being ingested into the geodatabase (because it is managed) it will be stored using this compression method.
- Once the raster is loaded as an attribute, you can view and perform other edits on it. Click the drop-down arrow for the raster field select one of the options in the menu.
- Click View to open the raster in a larger window.
- Click Load to load a different image as the raster attribute.
- Click Clear to delete the raster attribute.
- Click Save As to export the raster.
- Click Properties to view and edit the properties of the raster.
- When you are done, close the Attributes window.
- Click the Editor menu on the Editor toolbar and click Stop Editing.
You can also edit the raster attribute from within the attribute table. You need to be in a edit session. Click the raster drop-down arrow in the row you want to modify, right-click in the window that appears, then click Load.