ImportPhotos
ImportPhotos copied to clipboard
Add bulk image export button
Requirement
- First off, thanks for this plugin - it's fantastic!
- At HOT we use this to import drone imagery into QGIS, from multiple source directories.
- An additional requirement is to bulk export all of the imported images (copy them) into another directory.
- This collection of images is then uploaded to another tool for processing into an orthomosaic.
Solution & Screenshots
-
I added a bulk export button to the toolbar, with an icon and dialogs.
-
Clicking the button opens a similar dialog for layer selection to the 'Update Photos' button (I reused the code, which only allows for the selection of layers generated by this tool).
-
A directory selector dialog is shown.
-
The 'Path' attribute for the layer is used to copy the files to a new directory. On success a dialog is shown.
The test directory containing 3 image sub-directories (flight1, flight2, flight3):
The content of the final output directory, with the subdirectory name prepended to the files:
Notes
- The diff is huge, but the contribution is actually quite small. I ran
pyrcc5 -o resources.py resources.qrc
to update the resources.py file. - I also fixed a bug where closing the layer selection dialog for 'Update Photos' causes an exception (as no layer is selected for subsequent code).
- We would love to make another contribution to allow for spatial filtering via a layer selection (currently spatial filtering is only possible from canvas extent). Is this a desirable contribution?
- Also worthy of note, should I be including some translations in this PR too?