TransWikia.com

Save QGIS project to GeoPackage using PyQGIS

Geographic Information Systems Asked by Angel Rene Herrera Calzada on November 1, 2021

How it is possible save qgis project to GeoPackage in PyQGIS?

enter image description here

the image is user interface but I need in code

One Answer

You need to construct a URI like this:

uri = 'geopackage:/path/to/db.gpkg?projectName=my_gpgk_project'

And then use it to save the project, in this way:

QgsProject.instance().write(uri)

Answered by Germán Carrillo on November 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP