[Qgis-developer] Scripting QGIS from the outside using Python

pcreso at pcreso.com pcreso at pcreso.com
Sun Mar 18 15:40:51 EDT 2012


Some of Gary Sherman's blogs provide good info on this sort of thing. Like

http://spatialgalaxy.net/2012/01/27/qgis-running-scripts-in-the-python-console/


Brent Wood

--- On Mon, 3/19/12, Martin Dobias <wonder.sk at gmail.com> wrote:

From: Martin Dobias <wonder.sk at gmail.com>
Subject: Re: [Qgis-developer] Scripting QGIS from the outside using Python
To: "Nathan Woodrow" <madmanwoo at gmail.com>
Cc: qgis-developer at lists.osgeo.org
Date: Monday, March 19, 2012, 7:51 AM

On Thu, Mar 15, 2012 at 2:29 PM, Nathan Woodrow <madmanwoo at gmail.com> wrote:
> Is it possible to:
>
> Load QGIS from Python (well I know how to do this using
> QgsApplicaiton.Init())
> Open the project file
> Zoom to a location
> Print the first composer to pdf
> OR render out the map canvas to a image.

Hi Nathan

yes that's all possible from an external python script with PyQGIS,
without actually starting GUI.

> From what I can see the only way is to create a new composer item and pass
> it the composer node from the xml.

No need to play with XML, everything can be done using API, there is
an example in the cookbook:
http://qgis.org/pyqgis-cookbook/composer.html

Martin
_______________________________________________
Qgis-developer mailing list
Qgis-developer at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20120318/a3a3eb72/attachment.html


More information about the Qgis-developer mailing list