0

I used QGIS to put together an OSM XYZ Tile-layer and some WMS-layers. Now I want to make a print map out of it. When I try to export it from the print layout editor to PNG or PDF in the desired resolution and size, QGIS quickly eats up all memory of the system and then gets killed or crashes due to out of memory.

Before exporting, it warns me with a message that it will take something like 500 MB of memory. But when running it will very quickly eat up the 6 GB of (remaining) system memory, then the 8 GB of swap, and then gets terminated.

Is there an option to make QGIS work in pieces and stitch them together afterwards (probably with some other tool), or any other way to export a big raster image from the print composer?

It is currently QGIS 3.6.1 on Arch Linux.

  • 2
    Please Edit your question to use the title as a summary – Vince May 16 at 19:13
  • Can you export to PDF docs.qgis.org/2.18/en/docs/user_manual/print_composer/… instead of a raster format then use IView irfanview.com/faq.htm#PAGE15 or GhostScript ghostscript.com/download/gsdnld.html to convert the PDF into a PNG? (or not, if you only want to print it) The issue may be arising from rasterizing your layers where a PDF can store vectors as well as rasters minimizing the workload on complex data sets. How big is your page size? – Michael Stimson May 16 at 23:29
  • @MichaelStimson: The main data is raster data anyway, so exporting to PDF produces the same problem (and it generates .JPEG-compressed raster image, not PNG raster image, which is inferior in quality). – Golar Ramblar May 17 at 15:49
0

You've got tiles then merge the tiles. https://github.com/mapbox/untiler. Is one option another is make mbtiles or gpkg from your folder of tiles and then use gdal_translate to make a tif.

  • How to make QGIS to export a map layout from the print composer to tiles? – Golar Ramblar May 17 at 15:48
  • I think the suggestion here is to export only the map to tiles. If you have additional elements in the print layout that you need in the final map, you could export the print layout without the map (or with a blank map item), and combine it with the map tiles in a different program. – csk Jun 16 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.