Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bulk image export button #117

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

spwoodcock
Copy link

@spwoodcock spwoodcock commented May 22, 2024

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

  1. I added a bulk export button to the toolbar, with an icon and dialogs.

    1-bulk_export

  2. 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).

    2-export-layer

  3. A directory selector dialog is shown.

    3-select-folder

  4. The 'Path' attribute for the layer is used to copy the files to a new directory. On success a dialog is shown.

    4-export-complete

The test directory containing 3 image sub-directories (flight1, flight2, flight3):

5-root-dir

The content of the final output directory, with the subdirectory name prepended to the files:

6-output-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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant