UploadVectorToArcGISPortal Task

This task uploads a shapefile from ENVI to an ArcGIS Portal or ArcGIS Online account.

Example

; Start the application

e = ENVI()

 

; Open an input vector file

File = Filepath('qb_boulder_msi_vectors.shp', Subdir=['data'], $

  Root_Dir=e.Root_Dir)

Vector = e.OpenVector(File)

 

; Get the task from the catalog of ENVITasks

Task = ENVITask('UploadVectorToArcGISPortal')

 

; Define inputs

; Edit the URL, user name, and password with your own credentials

Task.INPUT_VECTOR = Vector

Task.PORTAL_URL = 'https://arcgis.com'

Task.USERNAME = 'My Username'

Task.PASSWORD = ENVISecureString(PLAINTEXT='my_password', $

    PUBLIC_KEY=Task.PUBLIC_KEY)

Task.ITEM_NAME = 'qb_boulder_msi shapefile'

 

; Run the task

Task.Execute

Syntax

Result = ENVITask('UploadVectorToArcGISPortal')

Input properties (Set, Get): INPUT_VECTOR, ITEM_NAME, PASSWORD, PORTAL_URL, PUBLISH, USERNAME

Output properties (Get only): ITEM_URL

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.

Methods

This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties

This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

INPUT_VECTOR (required)

Specify the input shapefile.

ITEM_NAME (optional)

Specify a string with the name for the published resource. This name will appear in the "Content" on the server. You can only edit the item name after it is created on the server. If you do not specify ITEM_NAME, the default name will be the input shapefile filename. If the item name already exists on the server, the task will fail.

ITEM_URL

The URL of the published resource.

PASSWORD (required)

Specify an ENVISecureString object representing the encrypted version of the ArcGIS password to use. This task has a hidden parameter named PUBLIC_KEY that must be used to correctly encrypt the plaintext password. See the Example for details.

PORTAL_URL (required)

Specify a string with the URL of the ArcGIS Portal (i.e., https://username.maps.arcgis.com or https://arcgis.com). If you set the URL to arcgis.com, the shapefile will upload to ArcGIS Online.

PUBLISH (required)

If this property is set to true, the shapefile will be uploaded and published to a feature layer that can be viewed using an Esri map layer. If false, the shapefile will be uploaded but you cannot view it in a map layer.

USERNAME (required)

Specify a string with the ArcGIS login user name with publishing permissions. The user name is case-sensitive in ArcGIS.

Version History

ENVI 5.6

Introduced

API Version

4.2

See Also

ENVITask, ENVIVector