I want to use the QGIS Map Composer with Python to automatically generate maps. As a base map of these maps I want to use tiles generated with Mapnik. Currently I am serving the tiles with mod_tile just like the regular osm tiles. I know I can simply use my url of my tiles in QGIS, but the quality of the tiles is made for web maps, and I need higher resolution. So my question is, if it is possible to somehow export a georeferenced image with Mapnik to use it in the QGIS Map Composer. Or if there is an other way to create some sort of high resolution tile with Mapnik and use it in QGIS?

  • wms on your local machine? - with higher dpi
    – Mapperz
    Commented May 14, 2014 at 16:51

2 Answers 2


You can also use Nik4 with --ppi 300 --wld <file> options to generate a large image with georeferencing.


The problem you can not resolve easily is that all features in the tiles are rendered with a defined size in pixel.

You could zoom in, make a snapshot of the mapnik tiles and use them with the QGIS Map composer of your original zoom level. But then all labels will get unreadable small.

So you need to create a separate high-res style for Mapnik first.

Alternatively, you can use nik2img.py to create a single picture with a world file using the -w option.

Or you can use taho exe if you are on Windows:


It can create a world file (only in EPSG:3395) too. You can change the configuration to use local tiles (and it has English menues as well under Bearbeiten -> Optionen).

  • Yeah I know that the default tile resolution would be too low. My question is if there is a way to generate a georeferenced image (like GeoTIFF) with Mapnik in order to use it in QGIS (I don't wanna set up another server for high-res tiles).
    – ustroetz
    Commented May 15, 2014 at 7:53
  • nik2img.py can do it, see gis.19327.n5.nabble.com/…
    – AndreJ
    Commented May 15, 2014 at 8:55

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.