ENVI provides a tool called the Intelligent Digitizer that extracts linear features (roads, coastlines, lake boundaries, and rivers) as vector data. With Intelligent Digitizer, you place seed points along the path of a feature in gray scale or multi-band imagery, and ENVI automatically finds the intermediate points. By using this method, Intelligent Digitizer reduces the number of mouse clicks you use to extract a feature, resulting in saved time and improved accuracy over traditional heads-up digitizing.
With Intelligent Digitizer, you can perform automatic post-processing procedures to improve the quality of the feature extractions, and you use ENVI’s Vector Parameters dialog to manage vectors, to perform basic vector editing, and to convert vectors to external formats such as shapefiles.
Exercise 3: Using the Intelligent Digitizer to Extract Roads
When extracting linear features, it is best to create separate layers for different feature types. The following exercise shows you how to create a new layer and extract roads with intersections and a highway with overpasses. You will use the Washington, D.C. SPOT data for this exercise, although ideally you should use high-resolution satellite or aerial imagery for accurate placement of features.
1. From the ENVI Toolbox, expand the Vector and double click onIntelligent Digitizer. The Intelligent Digitizer Input File dialog appears.
2. Select washdc_wgs.dat file, and click OK. ENVI automatically loads all three bands into a new display group for use with the Intelligent Digitizer. The Vector Parameters dialog also opens, with menu options for Intelligent Digitizer enabled. ENVI adds a new layer named “Intelligent Digitizer: New Layer” to the Available Vectors Layers area of the Vector Parameters dialog.
3. From the Vector Parameters dialog menu bar, select Mode Intelligent Digitizer Parameters. 4. In the Intelligent Digitizer Parameters dialog, set the Linear Feature Width (Pixel) to 15.00 for
Linear Feature Extraction Vector Layers
road extraction. Click OK.
5. In the Vector Parameters dialog, click the Off radio button to temporarily turn off vector editing. 6. From the Display group menu bar, select Tools Pixel Locator. The Pixel Locator dialog appears. 7. In the Sample field, enter 1507. In the Line field, enter 805. Click Apply, then close the Pixel
Locator dialog.
8. Enlarge the Zoom window so you can see all of the overpass and some of the Baltimore- Washington Parkway that extends to the northeast.
9. From the Vector Parameters dialog menu bar, select Edit Edit Layer Properties. The Edit Vector Layers dialog appears.
10. Set the Thick value to 3. Right-click in the Color box, and select Items 1:20 Red. Click OK. 11. In the Vector Parameters dialog, click the Zoom radio button to turn on vector editing in the Zoom
window.
12. In the Zoom window, begin left-clicking at intervals to add seed points that mark the road. ENVI automatically connects one seed point to the next, automatically adding vertices between the seed points as needed. Here are some tips for extraction:
For road centerline extraction, select seed points near the road centerline. For sharp curves in the road, select seed points at the sharp curves.
Vector Layers Linear Feature Extraction
location closer to the previous seed point will likely give a better result. You can middle-click more than once to remove seed points in reverse order, one at a time.
At intersections, extend the start or end node beyond the point where the two roads intersect. You will use automatic post-processing in a later step to remove dangling lines.
In areas that do not provide sufficient contrast between the feature and the background, or in areas of roads with overpasses, press and hold the Shift key to temporarily disable intelligent mode, then left-click to define the feature through the area. When you are past the area, release the Shift key to resume intelligent mode.
13. When you have enough seed points added to define a road, right-click in the Zoom window to set the final seed point, then right-click again and select Accept New Polyline. Optionally, if you are extracting a road that is near another road (or roads) that is already extracted, you can snap the node(s) to the nearest polyline(s). To do this, select Snap Start Node to Nearest Polyline, Snap End Node to Nearest Polyline, or Snap Both Ends to Nearest Polylines from the right-click menu.
14. Repeat adding seed points for each road you want to extract.
15. From the Vector Parameters dialog menu bar, select Edit Save Changes Made to Layer. After you extract polyline features, you can apply ENVI’s automatic post-processing cleanup tool to create intersections between polylines that cross one another, and to correct overshooting (dangling) polylines.
16. In the Vector Parameters dialog, right-click on Intelligent Digitizer: New Layer, and select Linear Feature Cleanup. The Linear Feature Cleanup Parameters dialog appears.
17. The Dangle Length Tolerance (Pixels) default value is 20.00. ENVI removes any dangling polylines shorter than this value during automatic linear feature cleanup. You can change this value in the dialog, if desired.
18. Click OK. ENVI removes any dangling polylines and creates intersections between crossing polylines. When complete, ENVI overlays the modified layer on the original layer (using a different
Linear Feature Extraction Vector Layers
Current Layer color). In the Vector Parameters dialog, ENVI adds the new layer named Intelligent Digitizer: New Layer_clean to the Available Vectors List.
19. When you are finished experimenting with Intelligent Digitizer, close the 3-window display group and all dialogs.
Exercise 4: Importing DEMs
1. From the ENVI menu bar, select File Open As Digital Elevation USGS DEM.
2. The DEM for the Washington area is broken into 2 pieces (East and West) and must be assembled by mosaicking them together. Navigate to the envidata\vectors directory, and select both the washington-e andwashington-w files, then click Open. The USGS DEM Input Parameters dialog appears.
3. Ensure that both DEM files are listed and that the Mosaic Files radio button is set to Yes. Type washdc.dem as the output filename and click OK. When asked if the dimensions of the output DEM are 2401 x 1201, answer Yes. ENVI mosaics the two DEMs together and displays the result. Zoom out to see the DEM; it extends beyond the SPOT image extent.
4. Click on the Cursor Value icon and roam around in the image. Data values for the DEM correspond to the elevation in meters relative to mean sea level.
Exercise 5: Overlaying Vectors on a 3D SurfaceView
1. Before 3D SurfaceView will display vectors, a 3-window display group has to be open with vectors overlying an image. One way to do this is to use the Intelligent Digitizer tool. From the ENVI Toolbox, expand the Vector listing and double click onIntelligent Digitizer. The Intelligent Digitizer Input File dialog appears.
2. Select the washdc_wgs.dat file, and click OK.
3. Click the Off radio button for the Vector Parameters dialog. Then in that dialog select File→ Open Vector File.
4. In the Select Vector Filenames dialog, select cities.shp, roads.shp, and counties.shp and click open. Then click OK in the Import Vector Files Parameters dialog.
5. If you want to make the vectors easier to see, edit them using the techniques in exercise 2. 6. From the ENVI Toolbox, expand the Terrain folder and double click on 3D SurfaceView.
7. In the Associated DEM Input File dialog, select thewashdc.dem image band, and click OK. The 3D SurfaceView Image Parameters dialog appears.
8. Accept the defaults, and click OK.
9. From the 3D SurfaceView menu select Options Import Vectors.
10. After the vectors are imported, you may see that some polylines appear to go beneath the topography. This is because of the vertical exaggeration that is the default for this window. To change this, click Options→ Surface Controls. Then in the 3D SurfaceView Controls dialog, decrease the Vertical Exaggeration.
The color composite image in the 3D SurfaceView window may be different than the image shown in the main display. This is because the header file for washdc_wgs.dat does not have
Vector Layers Skills Check
11. When you are finished exploring the 3D SurfaceView, close the display group and the 3D SurfaceView window.
12. Right click on the View listing in the Layer Manager and select Remove All Layers.
Skills Check
At this point you should:
Be able to import vector layers into ENVI Know how to Edit vectors