Hey list,

I have a fast vector layer in the foreground and a slow raster tile layer in the background. The vector layer has some simple labels. Neither layer uses any blending modes to my knowledge.

For rendering the labels QGIS waits until the layers have finished rendering which takes a while. Our users can use the labels to orient themselves and to decide where to pan and zoom. They could work faster if the labels would appear early on, before the slow raster layer finished rendering.

So I would like to have the labels render earlier, before the raster layer finishes loading, and then "just" composite(?) the scene for the final canvas image when done. Is there a reasonable way in PyQGIS to achieve that?

When I manually disable the raster layer, move the map, let it finish rendering (so the vector data and labels are visible) and then re-enable the raster layer, it plops up in the background without the labels being visibly re-rendered themselves so it seems technically possible.

As a hacky approach I tried disabling the raster layer right when the https://qgis.org/pyqgis/master/gui/QgsMapCanvas.html#qgis.gui.QgsMapCanvas.renderStarting signal, then re-enabling it when the render is done but of course that introduces "white flashes" from the background vanishing, then reappearing. Maybe it would be possible to tell QGIS to not request any new data/render for the raster layer for a while but use the cached render it currently has until the labels are done, then fetch and render for the updated extents?

Cheers, Hannes

Attachment: OpenPGP_0xBF7B268A77C202D5.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to