Attribute Viewer
If a vector layer or an Esri feature class layer has an associated attribute table, you can view and edit the table attributes. Right-click on the layer name in the Layer Manager and select View/Edit Attributes to open the Attribute Viewer.
You can filter the records by attribute, which is described in Filter by Attributes.
Select Vectors
Attribute data for a selected vector appears in the Cursor Value window.
- Click on a vector in the view to select the row in the Attribute Viewer table. To select multiple vectors, press and hold the Shift or Ctrl key as you click. You can also choose the Select button in the main toolbar, then click and drag in the Image window to select all the vectors in an area.
- Click on a row number in the Attribute Viewer table to highlight the vector in the Image window. To select multiple rows, press and hold the Shift or Ctrl key as you click.
- Use the icon buttons at the top of the table to change row selections and what is visible in the view:
- Clear Selection deselects the rows that were selected
- Invert Selection inverts the row selections (rows that were selected will be deselected, rows that were not selected will be selected)
- Select All selects all records in the table
- Go To Record jumps to and centers the view over the selected record
Navigate the Table
- Use the arrow buttons at the bottom of the Attribute Viewer to navigate rows in the table. Click on the desired button to go forward or back one row from the currently selected row, or to go to the first or last row in the table.
- If you know the row number you want to go to, type it into the field in between the arrow and press the Enter key.
- If you have many rows selected, you can click the up/down arrow keys next to the # of # records selected field at the bottom of the table to navigate through only the selected rows.
- To find specific text, enter the text in the Search field at the bottom of the table. All rows with matching text will be selected. Click the up/down arrow keys next to the Search field to navigate through only the selected rows.
Edit Records
- To delete columns selected columns, select Delete Columns from the Options menu or the right-click menu.
- To replace attribute table values, select a cell, multiple cells, columns, or rows and select Replace Cells with Value from the Options menu or the context menu.
- To sort the table, click on the row heading to sort by, then right-click for menu options. You can sort the column forward (ascending order) and reverse (descending order), by selected rows, or you can return the column to its original sort order.
If an attribute table exists for the layer, the following occurs:
- When you add a new vector record, a new empty record is added to the table.
- When you group, join, or merge vector records, the records for the individual vectors are removed from the table and a new blank record is added for the multipart or multipoint vector. To group or merge vector records, click the Vectors drop-down on the toolbar and select Vector Edit. Use the Ctrl key to select multiple vectors in the display, then right-click on one of the vectors and select Group or Merge.
- When you ungroup multipart or multipoint records, the row for the multipoint or multipart vector is removed from the table and a new blank row is added for each individual vector.
- When you delete an existing vector record or vertex, its row is removed from the table.
- When you edit existing vector records or vertices, the attribute values are not changed. This may mean, depending on the type of edits made, that the values in that record are no longer valid.
Save Tables or Records
Save any changes you make to the attribute table by choosing Save or Save As from the File menu or the context menu.
You can also select records and save them as a shapefile by choosing Save Selected Records to New Shapefile from the File menu or the context menu.
Add, Remove, and Import Attribute Columns
To add, remove, or import attribute columns, select Options > Add Columns to open the Add Attribute Columns dialog.
To add attribute columns, select the Add Columns button
in the Add Attribute Columns dialog. You can specify the following properties for each new column:
- Name: Type a name for the column.
- Type: Choose String or Number.
- Width: Type or move the arrows to the number of characters for the column. For strings, the width means the number of characters for the column. For numbers, the width definition is the maximum number of total digits before and after the decimal.
- Precision: Type or move the arrows to the number of decimal digits shown
Tip: The default value of 20.6 allows for large numbers. If you must change this value, remember to allow enough width for large numbers, including the number of decimal places you choose in the Precision field.
Te remove columns, click the Remove Column button
in the Add Attribute Columns dialog to delete a selected column definition from the list.
To import attribute columns, click the Import Columns button
to import attribute columns from other files with this option. Select one of the following options:
- Auto Populate Columns: This option displays several columns that will automatically populate with map location information. When you select this option, the available columns populate the list. Since this option requires map location information, it works with standard map data that includes a projection. It does not work with image (pixel) or RPC data.
- From Shapefile: This option allows you to open a shapefile and read the attributes from it. The file does not need to be open in ENVI.
- From Vector: This option allows you to choose a vector from open data in ENVI. For example, you could import attribute columns from GDB vectors, shapefiles, or EVFs.