ENVI::OpenVector
The OpenVector function method creates a new ENVIVector from a file or URI.
Example
e = ENVI()
file = FILEPATH('states.shp', $
SUBDIRECTORY = ['examples', 'data'])
vector = e.OpenVector(file)
Syntax
Result = ENVI.OpenVector(URI [, Keywords=value])
Return Value
This method returns a reference to an ENVIVector.
Arguments
URI
Specify a scalar string that is a fully-qualified file path to a vector file on disk. Supported formats include shapefiles, GeoPackage files, ENVI Vector Files (.evf), and ArcGIS file geodatabase feature datasets (Windows 32-bit systems only).
Or, specify a catalog path to a remote ArcGIS geodatabase feature dataset (Windows 32-bit systems only). If you connect to a remote dataset that requires authentication, you must set the USERNAME and PASSWORD keywords.
Keywords
Keywords are applied only during the initial creation of the object.
ERROR
Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.
When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.
See Manage Errors for more information on error handling in ENVI programming.
PASSWORD
Set this keyword to a string with a valid password for opening a remote dataset that requires authentication.
USERNAME
Set this keyword to a string with a valid user name for opening a remote dataset that requires authentication.
Version History
ENVI 5 |
Introduced |
ENVI 5.2.1 |
Added PASSWORD and USERNAME keywords
|
ENVI 5.3 |
Updated URI to include GeoPackage files |
API Version
3.6
See Also
ENVI function, ENVIVector, ENVIVector::Close