1. From the ENVI menu bar, select File Open. Navigate to the envidata\vectors directory and open cities.shp, roads.shp, and counties.shp. The vector layers are listed in the Layer Manager and loaded into the display. These vectors also come with the ENVI installation. 2. Move your cursor around the image and note the coordinate and projection information in the status
bar at the bottom. ENVI can automatically read projection information from most vector files. 3. The Washington, D.C. SPOT image is in the UTM map projection, but the map projection
information is not present in the image header so ENVI does not read the image as georeferenced. From the ENVI Toolbox, expand Raster Management and double click on Edit ENVI Header. In the Edit Header Input File dialog, click Open →New File, navigate to the envidata\vectors folder, select washdc_x.bil and click Open.
4. Click OK in the Edit Header Input File dialog
5. Click the Edit Attributes drop-down button, and select Map Info. The Edit Map Information dialog appears.
6. In the Image X and Image Y fields, type 1. This indicates that the reference pixel (the pixel for which you will enter map coordinates) is located in the upper-left corner of the image.
7. Click the Change Proj button. The Projection Selection dialog window appears.
8. Select UTM which is the map projection of the washdc_x.bil SPOT image. In the Zone field, type 18. This is the UTM zone for Washington, D.C.
If you did not know the correct UTM zone but knew the correct latitude and longitude, you could have clicked the Set Zone button, entered the latitude and longitude coordinates and have ENVI calculate the correct UTM zone for you.
Click OK to return to the Edit Map Information dialog.
9. The UTM Zone 18 map projection should now be listed, where an arbitrary map projection was previously listed. In the E field, type 301214.00. In the N field, type 4337515.00.
Vector Layers Editing Vector Layers
.
11. Click OK in the Header Info dialog. The SPOT image will be listed in the Data and Layer
Managers. In order to use the image as a base layer it has to be displayed first. Also, it should be in the same geographic coordinate system as the vector data (Latitude/Longitude), so first you will change the projection of the SPOT image to match the vector layers. First click on the View listing in the Layer Manager and select Remove All Layers.
12. Under Raster Management in the ENVI Toolbox double click on Project Raster. Click Browse and select washdc_x.bil in the Dataset to Reproject dialog. Click OK.
13. Click on Select Output Coordinate System and click on Geographic Coordinate Systems to expand that folder. Scroll down and expand the World folder. Then choose WGS 1984. Click OK. 14. For Output Dataset, type in Washdc_wgs.dat and click OK in the Project Raster Tool dialog. 15. From the Data Manager, load Washdc_wgs.dat as a (3,2,1) RGB image. Adjust the contrast of
the image. Linear 1% or 2% works well for a stretch.
16. In the Data Manager, select the three vector files, right click on them and choose Load Files. After the datum of the vector files (NAD 83) changes to match that of the image (WGS084), the vectors will overlay the image. In the next exercise you will edit them to make them more obvious.
Editing Vector Layers
The following vector display characteristics can be modified: Color
Line style (dash, solid, dotted, etc.) and thickness
Editing Vector Layers Vector Layers
Point symbol and symbol size Whether it is drawn
Exercise 2: Editing Vector Layers and Their Attributes
1. The icon for the currently active vector layer is enclosed in a red box in the Layer Manager. If cities is not the active layer, right click on it and choose Set as Active Layer.
2. Right click on cities.shp and choose Properties.
3. Click on the Color box, and then on its drop-drown list. From the color pallet choose yellow. 4. Click on the Symbol and then on its drop-drown list, select Asterisk as the symbol. Change the
Symbol Size to 20.
5. The new properties should have updated so click OK to close the Properties dialog. 6. Right click on cities.shp again and choose View Attributes.
7. Click on one of the asterisks in the display and the city will be highlighted in the Attribute Viewer. If you don’t see the city listing at first, click on the asterisk again. If you click on the row number for a city listed in the Attribute Viewer, its asterisk will be highlighted in the display. Use the scroll control under the attribute table to view all of the attribute fields.
You can use the buttons at the bottom of the Attribute Viewer to navigate to different records. If you know the number of the record you want to go to, type it into the field provided and press the ENTER key.
8. The attribute table can be manipulated. Change the column width by clicking and dragging on the division between the columns in the header row in or out (the cursor icon changes to a double- headed arrow).
9. You can sort the attribute information by column. To alphabetize the attribute table by city name, select the CITY_NAME column in the column header row, then, right click and select Sort by selected column forward or Sort by selected column reverse. Note that you can also Sort by original order.
10. Close the Attribute Viewer.
11. Right click on counties.shp and choose Properties. Change the Color to a bright green. Click OK to close the Properties dialog.
12. Right click on roads.shp and choose Properties. Click on the Color line, then click on the pull- down menu and select Custom Color. Choose cyan and then click Add to Custom Colors. Click OK and you will see cyan at the bottom of the color palette. Click on it there and the roads will be updated.
13. Change the road Thickness to 2. Click OK to close the Properties dialog.