X
4539

How do I create class vector layers from points generated in ENVI's Generate Random Sample tool?

This Help Article discusses how to export class specific points generated from the Generate Random Sample tool in ENVI to individual vector layers for each class.

Note: This article is relevant for ENVI Classic and versions of ENVI prior to ENVI 5.
 
Starting in ENVI 3.6, users have the ability to generate a random sample of points from classification images and classification Regions of Interest (ROIs). Such samplings can be valuable in supporting classification accuracy assessments and field truthing expeditions. Sometimes it is useful to export these points to vector layers that can be overlain on images within ENVI or other software packages.

Three types of random samplings are offered in ENVI's Generate Random Sample tool: stratified random, equalized random, and random. First, select the type and parameters for the random sample desired (see the ENVI On Line Help topic 'Random sample generation' for information on the available options in the Generate Random Sample tool). Once your options have been specified and you select OK, the points are generated and automatically output to ROIs.

Note: If the ROI Tool is not already open, you will need to then open it in order to see the generated points (from the display window of the displayed classification image select Overlay -> Region of Interest) . The points placed in the ROI Tool are saved in the ENVI session's memory and can be recalled whenever the ROI Tool is opened. However, the generated points will be lost if they are deleted from the ROI Tool or if the ENVI session is closed without saving the ROIs to a file. To save the ROIs to a file that can be restored at a later time, enter or choose an output ROI filename in the Generate Random Sample dialog, or in the ROI Tools dialog (under File -> Save ROIs...).

Once you have satisfactory points for each class in the ROI Tool, you can export them to ENVI vector files (.evf). In order to obtain a single vector layer for each class ROI, it is necessary to export the ROI classes one by one, with each ROI treated as one region. From the ROI Tool, select File -> Export ROIs to EVF... Select the first random sample class and then select the radio button for 'All Points as one record' to treat individual ROI points as one record or vector layer. Give the layer a descriptive name that reflects the selected class and enter an output .EVF name. The new Layer is placed in the Available Vectors List and can be displayed by highlighting the vector layer name and choosing Load Selected ->Display #n or New Vector Window. The point vector layer is displayed in the selected display or vector window. Repeat the ROI export to EVF as necessary to convert all class ROIs to ENVI vector layers.

Note: ROIs and ENVI vector layers use the default colors in the order that they appear in the ENVI color swatchs. If you edit or assign a different color to an ROI (in the ROI Tools, select the ROI to be edited and then select Edit), then export the ROI to a vector layer, you will have to re-assign the color to the vector layer that was selected in the ROI Tools -> Edit dialog.

If the vector was displayed in an image display window, you can change the color of the vector layer in the #n Vector Parameters dialog. Select the desired color by cycling through the color swatches next to Current Layer or right-click on the color swatch to get a drop-down text list of the available colors. If the vector layer was displayed in a Vector Window, you can change the color of the point layer by selecting Edit -> Edit Layer Properties.


Review on 12/31/2013 MM