Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
    
wms on your local machine? - with higher dpi –  Mapperz May 14 '14 at 16:51

2 Answers 2

up vote 2 down vote accepted

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

share|improve this answer
    
Really cool! Thanks for the link. –  ustroetz May 19 '14 at 15:16

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:

http://www.dimitri-junker.de/eng/html/openstreetmap.html

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).

share|improve this answer
    
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 May 15 '14 at 7:53
    
nik2img.py can do it, see gis.19327.n5.nabble.com/… –  AndreJ May 15 '14 at 8:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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