This batch procedure enables you to output an EVF to shapefile format, which consists of files with .shp, .shx, and .dbf extensions.

A single EVF may contain points, polylines, polygons and/or multi-point records all in the same file. A shapefile, on the other hand, may only contain one record type per file. If the EVF contains only a single record type, then the resulting shapefile output from ENVI_EVF_TO_SHAPEFILE consists of three files:

rootname.shp,
rootname.shx,
rootname.dbf,

where rootname is the output_shapefile_rootname argument string.

If the EVF specified by the EVF_ID argument contains multiple record types, then the output of ENVI_EVF_TO_SHAPEFILE is a separate shapefile for each record type. For instance, if an EVF has any point, polyline, polygon, or multipoint records, the resulting files for a shapefile named rootname are:

rootname_point.shp for point records

rootname_polyline.shp for polyline records

rootname_polygon.shp for polygon records

rootname_multipoint.shp for multipoint records

If the EVF contains associated attributes, these attributes are contained in the rootname.dbf file. If there are no attributes, a dummy record ID column is used.

Syntax


ENVI_EVF_TO_SHAPEFILE, EVF_ID, output_shapefile_rootname

Arguments

EVF_ID

This is the EVF ID returned from ENVI_EVF_OPEN.

The EVF_ID argument may be an array of IDs as long as output_shapefile_rootname is a string array of the same number of elements. There must be one output root name per EVF_ID.

output_shapefile_rootname

This is a string with the root name for the resulting shapefiles. Because the shapefile output consists of multiple files with specific extensions, you do not need to include the .shp extension as part of this string.

Because EVF files also use a *.dbf file to store attributes, the output shapefile name must be different than the name of the EVF file. In other words, if you name an EVF foo.evf, then the output_shapefile_rootname argument should not be foo if the two formats (.evf, .shp) will reside in the same directory.

API Version


4.2