Wednesday 31 August 2016

QGIS - export a project with dependencies



I was wandering if there was a way to save a specific project with all layers as dependent files to make it easy to share with collaborators.


for example, create a zipped or non-zipped folder containing the same structure as the project :


Root_folder/
my_project.qgs
\____________myfolder
\___Layer 1
\___Layer 2
\___Layer 3
\____________myfolder2
\___Layer 4

\___Layer 5
\___Layer 6
\____________myfolder3
\________myfolder4
\___Layer 6
\___Layer 7
\___Layer 8

If it does not exists, would it be tricky to develop regarding the current API ?



Answer




Have a look at the QConsolidate plugin. You can install it from Plugin Installer. If it does not provide a complete solution for your need, look to its code for examples on crafting your solution with the API. Creating a custom directory structure for the layers will probably need to be added.


Another portable file-based solution is to use a Spatialite database. It can handle vector and raster formats, and is natively supported in QGIS's new Database Manager.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...