5

We are using shapefiles with a large attached database to it (162 Mb for 133000 features). Opening this shapefile on a remote server takes about 5 minutes whereas DivaGIS takes 7 seconds for the same file.

My suspicion is that QGIS loads the entire shapefile to client and stores it in a temporary directory before rendering it whereas DivaGIS picks up the geometry, renders it and opens the .dbf file on the remote server.

My question is: "How does QGIS handle files and how can I improve this and / or can it be improved?"

(I have once read an article "QGIS on steroids" but I have not seen any improvement since QGIS 1.6)

Working with Postgis improves this a little bit but it doesn't come anywhere near the speed of DivaGIS.

8

This answer is specific to QGIS shapefile display performance. In general file I/O in QGIS is handled by the GDAL and OGR libraries.

If you aren't viewing all the geometries in a shapefile when you open it in QGIS then display performance will be enhanced by building a spatial index. QGIS does not use the ESRI shapefile spatial index (.sbn / .sbx) instead requiring it's own format to be built. Without a spatial index, viewing the geometry at any scale will require a full file scan which can be very slow for large datasets.

I'm not familiar with DivaGIS, but it may be that it is capable of utilising the ESRI spatial index, giving it a huge performance boost over QGIS in extracting geometries from the dataset for spatial extents smaller than the whole.

To create a spatial index in QGIS, open the layer properties dialog and in the General tab, click the 'Build Spatial Index' button.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.