GeoPackageToShapefile Task

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 parameters (Set, Get): INPUT_URI, OUTPUT_DIRECTORY, VECTOR_FEATURES

Output parameters (Get only): OUTPUT_URI

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

Input Parameters

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.

VECTOR_FEATURES (optional)

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

Output Parameters

OUTPUT_URI

This parameter contains an array of output shapefile URIs.

Methods

Execute

Parameter

ParameterNames

Properties

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History

ENVI 5.3

Introduced

See Also

ENVITask, ENVIVector