View and Filter Shapefile Attributes
Lesson content
Lesson 1 of 1
View and Filter Shapefile Attributes
In this quick guide, you will:
- Learn how to navigate the Attribute Table for shapefiles.
- Filter through associated metadata within shapefiles to find specific information embedded within.
Open Shapefile Attrtibutes
ENVI opens shapefiles (.shp) natively. Some global shapefiles are included in the ENVI installation.
- 1
From the Menu bar, select File > Open World Data > Airports. Global airports will load in the main display.

- 2
We don't want to edit that original shapefile so let's save a copy. Right-click on the airports.shp layer name in the Layer Manager and then select Save As. Select a path and enter a filename airports_edit.shp. Click OK. ENVI will automatically display the new shapefile. 2. 2
Right-click on the airports_edit.shp layer name in the Layer Manager and select View/Edit Attributes.

Attribute Viewer for "airports" shapefile.
- 3
Look through several rows and columns in the Attribute Table to understand which attributes we can use. 2. 4
When finished, close the Attribute Table.
Check the ENVI docs for Attribute Viewer capabilities and navigation: Attribute Viewer ((opens in a new tab)nv5geospatialsoftware.com(opens in a new tab))(opens in a new tab)
Filter Records by Attributes
Sometimes it is helpful to query a shapefile for specific attributes for your analysis. If we want to create a map of only major airports, you would use Filter Records by Attributes.
- 1
Right-click on airports_edit.shp in the Layer Manager and select Filter Records by Attributes. 2. 2
In the first drop-down menu select "type" for the attribute to filter from. 3. 3
In the second drop-down menu select "Equal To". 4. 4
Adjust the slider bar to see how your results will change from each airport type, then ensure the value reads "major".

Note that your filter selections will be highlighted in black squares.
- 5
Notice that there are 367 airports classified as 'major' as indicated along the bottom of the Filter by Attributes window. 2. 6
Click the "Save Selection to Shapefile" button indicated by the floppy disk icon. 3. 7
Select a file path and then name the filtered shapefile to "major_airports.shp", then click Save. ENVI will display this new shapefile automatically. 4. 8
Turn off the airports_edit.shp layer in the Layer Manager. 5. 9
Add a global background globe image by clicking File > Open World Data > Shaded Relief. You may need to drag the major_airports.shp layer above the shaded relief layer. Your screen should look like the image below.

This concludes the quick guide.
Your input is important to us, please take a few moments to fill out ourQuick Guide Feedback(opens in a new tab)form.
© 2024 NV5 Geospatial Solutions, Inc. This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR).