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


  >  Docs Center  >  ENVI API  >  Application Control  >  ENVI::OpenVector

ENVI::OpenVector

ENVI::OpenVector

The OpenVector function method creates a new ENVIVector from a file or URI.

Example


; Launch the application
e = ENVI()
 
; Open a shapefile
file = FILEPATH('states.shp', $
  SUBDIRECTORY = ['examples', 'data'])
 
; Create an ENVIVector from the shapefile 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 or GeoPackage file on disk. Or, specify a catalog path to a remote 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, Service Pack 1

Added PASSWORD and USERNAME keywords

ENVI 5.3

Updated URI to include GeoPackage files

API Version


3.2

See Also


ENVI function, ENVIVector, ENVIVector::Close



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us