Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Using ENVI / Vectors Tutorial

ENVI

Vectors Tutorial

Vectors Tutorial

In this tutorial, you will use ENVI to display a QuickBird multispectral image on which you will create new vector layers and add vector records and annotation items.

Files Used in This Tutorial


Tutorial files are available from our website or on the ENVI Resource DVD in the feature_extraction directory.

File

Description

qb_colorado.dat

QuickBird multispectral image, Boulder, CO, USA, captured July 4, 2005

qb_colorado.hdr

Header file for above

QuickBird files are courtesy of DigitalGlobe and may not be reproduced without explicit permission from DigitalGlobe.

Starting ENVI


  • Windows Start menu: Select Programs > ENVI x.x > ENVI.
  • UNIX: Type envi at the UNIX command line.

Opening and Displaying an Image


  1. Click the Open button Open on the toolbar. The Open dialog appears.
  2. Navigate to feature_extraction and open qb_colorado.dat.

Creating Vector Layers


Create one vector layer for polygon records and one vector layer for polyline records. When working with vectors, you create separate layers for each vector record type. For example, if you create a polygon vector layer, it can only contain polygon records; it cannot contain point records.

  1. From the menu bar, select File > New > Vector Layer. The Create New Vector Layer dialog appears.
  2. Enter Boulder_Buildings as the Layer Name.
  3. Select the vector layer type Polygon from the Record Type drop-down list.
  4. Select qb_colorado.dat as the source file that defines the new layer’s base projection.
  5. Click OK. ENVI adds the new layer to the Layer Manager as the active vector layer. In cases where you have multiple vector layers loaded, only one layer at a time is the active layer.
  6. To create a second new vector layer, right-click on the View layer in the Layer Manager and select New > Vector Layer.
  7. Enter Boulder_Roads as the Layer Name.
  8. Select the vector layer type Polyline from the Record Type drop-down list..
  9. Select qb_colorado.dat as the source file that defines the new layer’s base projection.
  10. Click OK. ENVI adds the new layer to the Layer Manager. Now this layer is the active vector layer, and the Boulder_Buildings layer is no longer the active layer.

    Layer Manager

Adding and Saving Vector Records


Since Boulder_Roads is the active layer, you’ll add vector records to this layer first. When you added the new vector layer, the Create Vector tool was automatically enabled on the toolbar.

  1. In the Image window view, draw polylines along any four roads in the scene. To draw polylines, click and release to follow the shape of the road.
  2. To complete the polyline and accept it in the layer, press Enter.
  3. Save the vector layer before you continue. Right-click on Boulder_Roads in the Layer Manager and select Save As. The Save As dialog appears with Boulder_Roads in the File name field.
  4. Click Save.
  5. Draw two polylines that are close together, but not touching each other.
  6. From the Vectors drop-down on the toolbar, select Join Vectors.
  7. Select the one of the polylines you just drew.
  8. Drag the cursor to the second polyline you drew to connect the two polylines.
  9. Press Enter to complete the join.
  10. Click the Create Vector button in the main toolbar.
  11. Draw one more polyline.
  12. From the Vectors drop-down on the toolbar, select Edit Vector.
  13. Select the polyline you just created.
  14. Right-click on the polyline layer in the Layer Manager and select Properties. The Vector Properties dialog appears. You can change the appearance of the polylines by choosing different settings in this dialog.
  15. Close the Vector Properties dialog.
  16. With the polyline still selected, right-click and select Delete.
  17. Save the layer. Right-click in the Image window and select Save.

Next, you will make Boulder_Buildings the active layer and add records to it.

  1. In the Layer Manager, right-click on the Boulder_Buildings layer and select Set as Active Vector Layer. The icon next to the layer name is outlined in red to indicate it is the active vector layer.
  2. Layer Manager

  3. From the Vectors drop-down on the toolbar, select Create Vector.
  4. In the Image window, draw polygons over one building in the scene. Click and release to follow the outline of a building in the image.
  5. To complete the polygon and accept it in the layer, double-click, or press Enter.
  6. Repeat this procedure five more times to create polygons over six buildings.
  7. Group some of the polygons together.
  8. From the Vectors drop-down on the toolbar, select Edit Vector.
  9. Use Ctrl+click to select three of the polygons.
  10. Right-click and select Group. You can ungroup the polygons by right-clicking again and selecting Ungroup.
  11. Save the vector layer before you continue. Right-click on Boulder_Buildings in the Layer Manager and select Save As. The Save As dialog appears with Boulder_Buildings in the File name field.
  12. Click Save.

In the final steps for vectors, you will modify the placement of vertices for some of the polygons you created. The Boulder_Buildings layer is still active, so you will edit that one.

  1. From the Vectors drop-down on the toolbar, select Edit Vertex.
  2. Select a polygon.
  3. Place the cursor over a vertex to move.
  4. Click and drag the cursor to move the vertex to the new location. You can optionally use the up, down, left, and right keyboard keys to move the location one screen pixel in the direction of the arrow.
  5. Release the mouse button to reposition the point or vertex.
  6. Save the layer. Right-click in the Image window and select Save.
  7. Remove the vector layers from the Image window. Right-click on Boulder_Buildings in the Layer Manager and select Remove. Repeat this step for Boulder_Roads.




© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us