Linked Questions

22 votes
3 answers
21k views

Importing qgis.core when writing standalone PyQGIS script

I am trying to write a standalone Python script in windows 7 that uses qgis.core and various other qgis libraries. I have found an old question on this subject at Writing standalone Python scripts ...
user24956's user avatar
  • 409
11 votes
2 answers
4k views

Export a configured Atlas with a Python script / command line?

I just want to export a configured Atlas (composer with Atlas option and cover layer enabled) I tried this : composerView = qgis.utils.iface.activeComposers()[0] composition = composerView....
Nat Lebo's user avatar
  • 131
7 votes
1 answer
4k views

Saving Map Canvas as PNG with transparent background programmatically with QGIS?

I wrote a script to create a big number of heat maps for a given scenario. I would like to save the result of every heat map as an PNG image. I have figured it out doing it with simple Map Rendering ...
user29533's user avatar
7 votes
1 answer
2k views

Batch export from multiple QGS projects to image or PDF

I'm looking out for a way to batch export to PDF or image many composers spread in many QGS projects, the same way the plugin Map Printer does, but on a large number of projects at the same time. ...
gisnside's user avatar
  • 7,838
4 votes
1 answer
3k views

Exporting composition as image using PyQGIS

QGIS Print Composer has tool "Save As Image" and I found appropriate function in QGIS source code exportCompositionAsImage. Is it possible to get access to existing Print Composer from ...
drnextgis's user avatar
  • 6,938
11 votes
1 answer
1k views

QGIS export composer as pdf in python

I have a QGIS project which contains a composer. Of course if I go into the GUI I can export it as a pdf etc. For my make script though I want to have this done via a python script. From reading ...
David Mokon Bond's user avatar
10 votes
1 answer
1k views

How to fill composer map with canvas data and export composition as png using Python script in QGIS

I'd like to create a Python script in QGIS that will take some data (shp + tif, in my example), use tamplate Map Composer (from a file) and export created composition to a png image. With almost no ...
hans80's user avatar
  • 101
3 votes
1 answer
746 views

How to export Atlas as images from a headless server?

I have a QGIS project that has an Atlas print composer that I can use to generate multiple images (JPG) of each of my departments. Now I would want to generate all those images but directly from a ...
Anthony O.'s user avatar
0 votes
1 answer
1k views

PyQGIS change layer visibility

I'm trying to automate the creation of images using a combination of QGIS map documents and templates as discussed here using a standalone script. When complete, the script will regenerate a map using ...
neighdough's user avatar
1 vote
1 answer
1k views

Enable layer plugins when using external standalone QGIS python scripts

I created a QGIS standalone script (custom Application) that enables me to automatically export Atlas as images. The problem is that in my QGIS project, I'm using a Mask plugin and the generated ...
Anthony O.'s user avatar
3 votes
2 answers
553 views

How can I read the settings for the QgsPaperItem from XML?

I saved a template qpt for the map composer and now I want to read all the settings. I am able to insert the items with composition.addItemsfromXML... But this doesn't load the settings for the ...
ahoi's user avatar
  • 43
2 votes
0 answers
824 views

Save map canvas as image with Python in QGIS [duplicate]

I'm trying to save the map canvas as an image in Python in QGIS. I've looked in a few places but haven't been able to get something to work. I need a function where I can specify the extent of the map ...
exkoria's user avatar
  • 239
3 votes
1 answer
625 views

Printing map in Print Composer to specified name (not Print Composer 1, 2, etc)?

I am trying to print a pdf map, while using a .qpt template. I can create a pdf output but I how do I name the created print composer? Each time I run the tool it creates a new 'Composer 1' then '...
Michael Rodney's user avatar