Speeding Up QGIS Rendering – a Workaround (sort of)

Posted: February 21, 2012 in GIS
Tags: , , , , ,

It is known that QGIS is painfully slow in redrawing canvas when at least one of the vector layers contains a lot of features. The obvious way to speed up the process is to forbid to render layer (or some of the features) at certain scale(s). Yes, it works, but what do we have to do, when we want to see the whole picture? To disable scale rendering and wait couple of minuets until the several hundreds of thousands features will be redrawn? Bo-o-oring!

The workaround that I use is not that elegant (as a rule based feature scaling for example), but it can be used in certain situations. When your vector layer is large but it is necessary to see all the features – start a WMS-server for this particular layer. Raster renders a way more quickly and will be generated by different software. Taking into account that the layer is on the same machine or in the local network the speed increase will be magnificent.

So you produce WMS-layer from the needed layer (lets call it parent-layer) by WMS-sever of choice (I use GeoServer because it has a straightforward GUI that allows you to set up server and WMS-layer in minuets), add it in QGIS and place it under the parent-layer. Then set visibility of the parent-layer to the larger scale (that is suitable for editing). Now you will be able to see the whole picture at the small scale, and rendering still will be fast. And because WMS-layer is produced from the same layer all of the committed changes to the parent-layer will appear at WMS-layer immediately.

And you will have another thing to decide: whether to create the same [complicated] style for WMS-layer as for parent layer or not. Well, I do not bother)))

Small Scale

Large scale

  1. A more straightforward solution is to use the “rule based renderer” (you find it in the vector properties, style tab), a symbology renderer that allows you to create rules made of scale intervals and filters (using standard sql queries). For each rule you can then define ots own symbology.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s