[Qgis-developer] Batch generation of map images with MTR

Richard Burkmar rich.burkmar at gmail.com
Thu Nov 6 01:44:12 PST 2014


Many thanks for all the help. Before I got the responses, I found a way to
make it work, but I'm clearly not working with the new paradigm, so I will
revisit it soon. That code looks very neat Nathan. Thanks for the tip about
Atlas Andreas - I will look at that too.

Thanks and best wishes,

Rich

On Wed, Nov 5, 2014 at 11:02 PM, Nathan Woodrow <madmanwoo at gmail.com> wrote:

> Hey Richard,
>
> There is a new class you can use for the rendering because we now have MTR
> you have to wait for the image, or listen for the done event.  The code is
> pretty easy and you can see an example of me using it here:
>
>  https://github.com/DMS-Aus/qgis2img/blob/master/qgis2img/render.py#L43
>
> The basics are:
>
>     job = QgsMapRendererParallelJob(settings)
>     job.start()
>     job.waitForFinished()
>     image = job.renderedImage()
>
> settings is a QgsMapSettings class which you can make or take from the
> canvas using iface.mapCanvas().mapSetttings()
>
> QgsMapSettings has a list of layers to render so you can update that
> without changing the layers on the canvas, it's very handy.
>
> Give that a try and see how you go.
>
> - Nathan
>
>
> On Thu Nov 06 2014 at 1:30:54 AM Richard Burkmar <rich.burkmar at gmail.com>
> wrote:
>
>> My apologies - I didn't check the latest version of MMQGIS so my
>> statement that the animation feature doesn't work with the latest version
>> of QGIS was incorrect. It seems that they have solved the problem that I
>> encountered, so I'll take a look at the code there.
>>
>> (I hope that this message comes out in the correct thread - I couldn't
>> see how to do it, so I'm sending a message with the same title. I'm new to
>> these mailing lists.)
>>
>> Rich
>> _______________________________________________
>> 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/20141106/6b742ae5/attachment.html>


More information about the Qgis-developer mailing list