2

I've read how to use the QGIS Browser to add layers into the project from within zip files, but this doesn't seem to be available with processing dialogs.

I'm trying to merge two raster files using Raster>Miscellaneous>Merge. For my input files it only recognises unzipped files in the folder. If I choose the zip folders as inputs it gives and error that this is not a recognised file type. Is there a way of taking files into processing dialogs direct from zip folders?

1 Answer 1

1

I do not believe this is possible as most of the Processing tools are designed to read the required file directly. What you may need to do is create a python script which:

  1. Automcatically unzips all the rasters in your zipped file to some directory.
  2. Reads and stores the paths of those unzipped rasters in a variable.
  3. Passes the variable to the Merge tool.

An example of unzipping a compressed file and passing the variable to a processing tool can be seen in this tutorial. Look at Step 21 for the unzipping part; the full code can be seen after Step 29:

Running and Scheduling QGIS Processing Jobs

2
  • 1
    Thank you. I had a feeling it wasn't going to be possible.
    – simonc8
    Commented Nov 14, 2016 at 11:21
  • @simonc8 - Most welcome, you could always request it as a feature request for a future QGIS version =)
    – Joseph
    Commented Nov 16, 2016 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.