Assuming you have 20+ Qgis projects each with dozens of layers:

  • Background: Web Map Tiles,
  • Features: Millions of Polygons & Points
  • Features are labeled, labels are never overlapping with each other
  • Styled to look perfect in any zoom Layer
  • Gives perfect results if printed out via the composer as atlas

Problem: If you want to convert the whole project with right this styling into MBTILES or Slippy Maps, what is the best solution ?

I spend for 4days testing and failing with:

  • QTiles (Problems with Labels, which occur in every Tile, slow)
  • QMetatiles (Crashes very often while saving directly to mbtiles, slow)
  • Converting an Atlas as GeoTIFF via GDAL2MBT to MBTILES (unstable, labouros if you have many projects)
  • Setting up a QGIS WMS Server and reading the tiles with the Mobile Atlas Creator (labourous if you have many projects and unstable)

Is there a universal, robust solution to export the QGIS Canvas to Tiles, fast (like a "Save As ..." Button)?

After reading every google result twice, testing many github tools, I'm blind or searched the wrong keywords. I'm open for obvious and strange suggestions, as long as it doesn't involve a reprogramming for every export.

1 Answer 1


The "tile_writer" python application by Alexander Hajnal works very well, at least up to QGIS version 2.18. It does not cut labels and is fast compared to QTiles:


Some users have difficulty getting the globalmercator module to load, but this can be resolved by entering a command into the python console, which will direct the script to the folder where both the module and the main script are stored:


Press ENTER and then follow with this command:

import globalmercator

Note that the above steps should be performed after you try to launch the program in the normal way.

It's not fast like "SAVE AS" but it is currently the best way I know to produce map tiles from QGIS.

  • A working solution! Not really userfriendly but stable after I understood that the project and the border projection must be EPSG:4326, and not only reprojected. Speed: about 20x slower than the export of an atlas. One could modify the "Splitting loop" to parallel processing. As postprocessing I used "mb-utils" to combine the folder to one mb-tile file. Positive: Easy to read short script!
    – UHM
    Commented Jun 14, 2018 at 14:16
  • I'm glad. I guess if it's a solution you should click the check icon and accept it, then the case is closed. Warning: tile_writer may not work with QGIS 3.0! When I tried, it seemed to have an incompatibility with the new version of python. Commented Jun 14, 2018 at 21:22

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.