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

Merged
merged 4 commits into from
Jan 10, 2025
Merged

Conversation

spwoodcock
Copy link
Contributor

@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?

@spwoodcock
Copy link
Contributor Author

Hi again!

Is this project maintained & open to pull requests? Or am I better off forking?

@Mariosmsk
Copy link
Member

Hi @spwoodcock, thank you for your contribution! Sorry for the late response - great addition!
I’m glad to see it being used by the Humanitarian OpenStreetMap Team.

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?

Any contributions are welcome!
Thank you!

@Mariosmsk Mariosmsk merged commit c8a9596 into KIOS-Research:master Jan 10, 2025
@spwoodcock
Copy link
Contributor Author

spwoodcock commented Jan 10, 2025

Hi @spwoodcock, thank you for your contribution! Sorry for the late response - great addition!
I’m glad to see it being used by the Humanitarian OpenStreetMap Team.

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?

Any contributions are welcome!
Thank you!

Amazing, thank you 🙏

Thanks to you for this plugin! Its very helpful for visualising and pre-processing drone imagery files 😁

@spwoodcock spwoodcock deleted the feat/bulk-export branch January 10, 2025 20:11
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.

2 participants