[Qgis-developer] Incremental rendering update
Marco Hugentobler
marco.hugentobler at karto.baug.ethz.ch
Mon Oct 15 12:28:28 EDT 2007
Dear qgis devs,
One of the things I miss most in the current qgis version is the incremental
update of the map when it is rendering. So on a long train journay, I took
some time to look how this can be restored with minimal changes to the
sources and the architecture. The source tarball of my experiments can be
downloaded at:
http://karlinapp.ethz.ch/qgis_incremental_update.tgz
This is just a 'proof of concept'. If other devs like the approach, I can make
a branch with these changes and fix remaining bugs.
The principle is that QgsMapCanvas and QgsMapCanvasMap have two methods: One
that triggers the map rendering and one that just updates the canvas with the
rendered QImage.
The QgsMapLayers have a signal called 'repaint requested' that is connected
with the signal 'refresh' of the map canvas. Emiting the 'repaint requested'
signal calls the method that updates the canvas with the currently rendered
image, so the maplayer may decide when an update is appropriate.
Zoom and pan actions on the canvas on the other hand trigger the method that
invokes the rendering process.
I think that this way, it is also possible to have the possibility to stop the
rendering progress if a huge dataset has been opened. And of course I have
other ideas in mind like smart zooming or making tiled wms requests (similar
to the way OpenLayers does it)...
What are your opinions about that?
Best regards,
Marco
--
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
marco.hugentobler at karto.baug.ethz.ch
More information about the Qgis-developer
mailing list