Skip to content

Export basemap as mbtiles during cable export#105

Merged
suricactus merged 1 commit intomasterfrom
QF-4902-package-rasters-multiple-zoom-levels
Mar 5, 2025
Merged

Export basemap as mbtiles during cable export#105
suricactus merged 1 commit intomasterfrom
QF-4902-package-rasters-multiple-zoom-levels

Conversation

@gounux
Copy link
Member

@gounux gounux commented Feb 20, 2025

This PR makes the cable export generate a mbtiles basemap for QField, thus enabling multiple raster zoom levels.

Subtasks:

  • add generated mbtiles min and max zoom in project configuration
  • use QGIS' native:tilesxyzmbtiles processing algorithm to generate a mbtiles file
  • implement Single layer basemap mbtiles export during cable export
  • test Single layer basemap mbtiles export during cable export
  • test Single layer basemap mbtiles in QField app
  • implement Map theme basemap mbtiles export during cable export
  • test Map theme basemap mbtiles export during cable export
  • test Map theme basemap mbtiles in QField app
  • connect external tiles gen algorithm's feedback progress to QFieldSync progress bar

see opengisch/qfieldsync#637

Copy link
Member Author

@gounux gounux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts and reflections about the ongoing dev work made so far.

ping @suricactus

@gounux gounux force-pushed the QF-4902-package-rasters-multiple-zoom-levels branch from 13b5ab5 to 053ffd4 Compare February 26, 2025 11:35
@gounux gounux marked this pull request as ready for review February 26, 2025 11:36
@gounux gounux requested a review from suricactus February 26, 2025 11:37
Copy link
Collaborator

@suricactus suricactus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. We need to add a cancelling algorithm, as I mentioned on the QFieldSync repo.

@gounux gounux requested a review from suricactus March 4, 2025 15:50
Copy link
Collaborator

@suricactus suricactus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! First from many PRs in (lib)qfieldsync! Small comment about documenting the finally. Ready to merge right after addressing it!

@gounux gounux force-pushed the QF-4902-package-rasters-multiple-zoom-levels branch from f715822 to 9e7dbf1 Compare March 4, 2025 17:37
Set max tiles zoom level export to 14

Use a cloned version of basemap layer when for independant project export

Remove old tiff offline export

Add comment for raster layer cloning

Clone project to generate tiles based on map theme

Connect native mbtiles alg progress to custom progress signal

Remove unused tiff basemap generation method

Add offline converter cancel logic

Update libqfieldsync/offline_converter.py

Co-authored-by: Ivan Ivanov <suricactus@users.noreply.github.com>

Add flag to store and check canceled state of the packaging

Add comment for the try packaging finally clause

Play it more defensive with sign disconnection
@gounux gounux force-pushed the QF-4902-package-rasters-multiple-zoom-levels branch from 9e7dbf1 to a7a88b5 Compare March 5, 2025 07:35
Copy link
Collaborator

@suricactus suricactus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Huge first PR!

@suricactus suricactus merged commit 70562dd into master Mar 5, 2025
6 checks passed
@suricactus suricactus deleted the QF-4902-package-rasters-multiple-zoom-levels branch March 5, 2025 07:41
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