This task converts GeoPackage vector files to Shapefile format.

Example


; Start the application
e = ENVI()
 
; Define input file
file = Filepath('simple_sewer_features.gpkg', $
  SUBDIR=['data','geopackage'], ROOT_DIR=e.Root_Dir)
outDir = envi.GetTemporaryFileName('')
vecFeatures = ['s_manhole']
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('GeoPackageToShapefile')
 
; Convert to shapefile
Task.INPUT_URI = file
Task.VECTOR_FEATURES = vecFeatures
Task.Execute
 
; Get the output shapefiles
outputShapefiles = Task.OUTPUT_URI
 
; Open and display shapefiles
view = e.GetView()
FOREACH shapefile, outputShapefiles DO $
  vector = e.OpenVector(shapefile)
  layer = view.CreateLayer(vector)

Syntax


Result = ENVITask('GeoPackageToShapefile')

Input properties (Set, Get): INPUT_URI, OUTPUT_DIRECTORY, VECTOR_FEATURES

Output properties (Get only): OUTPUT_URI

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_URI (required)

Specify a string with the fully-qualified file name and path of the GeoPackage vector to be used as input.

OUTPUT_DIRECTORY (required)

Specify the directory for shapefile output. If unspecified, output is written to the output directory defined in ENVI Preferences.

OUTPUT_URI

This property contains an array of output shapefile URIs.

VECTOR_FEATURES (optional)

Specify individual vector features contained within the GeoPackage file to be converted.

Version History


ENVI 5.3

Introduced

API Version


4.3

See Also


ENVITask, ENVIVector