[QGIS-Developer] processing temporal animation export in parallel

Richard Duivenvoorde rdmailings at duif.net
Tue Feb 22 11:02:04 PST 2022


Hi Dolf,

I hope others can confirm/falsify, but I do not think you can do parallel painting, as QGIS has just one MapCanvas, and for what I know QGIS first paints the map on that MapCanvas (given your layers, styles, temporal filter etc etc), and then 'just' creates an image from that?
But maybe I'm wrong in this.

Slow (as in Hours?) that would be a huge map or very complex styling, OR a lot of timesteps/frames?
Also: how does QGIS itself render your map if you step through it using the temporal controller? Can you maybe set (spatial/temporal) indexes on your data?

Regards,

Richard Duivenvoorde

On 2/22/22 10:06, Dolf Andringa wrote:
> Hi all,
> 
> The temporal animation functionality of QGIS is great. I am currently playing with it, probably a little out-of-scope, to make a travel animation on a map. Everything works great, except that at high frame rates and high resolution, exporting the animation to images is very slow (hours).
> 
> I dug into the code a little, and in bool QgsTemporalUtils::exportAnimation
> I see:
> 
> while ( currentFrame < totalFrames )
> {
>      ...
>      QPainter p( &img );
>      QgsMapRendererCustomPainterJob job( ms, &p );
>      job.start();
>      job.waitForFinished();
>      ...
> }
> 
> Which renders each image in sequence. I am new to QGIS development specifically, so forgive my ignorance, but could the jobs system be used to render them in parallel instead? Could this potentially speed up the process significantly? If this is feasible, I'd gladly make a feature request, and it also looks like a nice PR I could contribute myself potentially? I'd love to hear your thoughts.
> Cheers,
> 
> Dolf.
> 
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the QGIS-Developer mailing list