GeoPackage Data Management API

Module: mls.gpkg. This page documents 2 public functions with exact tool IDs, complete parameters, Parameters fields, and examples.

Back to the Script Tool API Reference

Functions

  • gpkg_import — Import GPKG file into the current project
  • export — Export data to GeoPackage (GPKG) format

gpkg_import

Import GPKG file into the current project

  • Exact tool ID:gpkg_import
  • Recommended call:mls.gpkg.gpkg_import(...)
  • Required parameters:source_path, target_path, file_list

Parameters

Parameter Type Required Default Description
source_path string Yes — GPKG path to be imported
target_path string Yes — Target GPKG import path
option string No — Coordinate transformation parameters
file_list array Yes — Layer name(s) of the source GPKG to be import; by default, all layer names from the source GPKG will be used; not null

Example

from gvscript import mls

result = mls.gpkg.gpkg_import(
    source_path='D:/data/input.LiData',
    target_path='D:/data/input.LiData',
    option='example',
    file_list=['example'],
)
print(result.ok, result.output, result.message)

export

Export data to GeoPackage (GPKG) format

  • Exact tool ID:gpkg_export
  • Recommended call:mls.gpkg.export(...)
  • Required parameters:source_path, target_path, file_list

Parameters

Parameter Type Required Default Description
source_path string Yes — GPKG path to be exported ,Current project gpkg
target_path string Yes — Output GPKG file path
file_list array Yes — Layer name(s) of the GPKG to be exported; by default, all layer names from the source GPKG will be used; not null

Example

from gvscript import mls

result = mls.gpkg.export(
    source_path='D:/data/input.LiData',
    target_path='D:/data/input.LiData',
    file_list=['example'],
)
print(result.ok, result.output, result.message)

results matching ""

    No results matching ""