within one project we are distributing a QGIS project including offline maps (you can get it here - has about 1GB) to display measurement data. Looks this way:

QGIS project with print output

I need to keep it as easy as possible so I used spatialite/sqlite DBs with custom styled OSM data (Google like styles from @Underdark) and contour lines generated from EU-DEM:

offline map

However the performance is relatively slow although I set particular layers to only show in defined scale range. I can avoid much lagging by first switching off the offline maps, then add new data, zoom to new layer and switch offline maps again on but it is not much comfortable.

I cannot use additional SW like PosGIS DB as it would be complicated for the users to install it. Is there any way to improve the performance?

I am thinking about generating raster layers in 1:200 000, 1:50 000 and 1:25 000 scale and using maybe virtual raster + scale dependent display to avoid forcing the user to manually switch the offline map layers.

What would you recommend?

  • 1
    You probably have done it when importing the data into the db, but do you have a spatial-index for each layer? SELECT CreateSpatialIndex('yourtable', 'geom'); – Matte Mar 29 '16 at 18:15

One important thing is to add indices to the data, you can do that in the QGIS DB Manager:

enter image description here

Then there's another issue: The contours are so detailed and big that the spatial index barely helps and labeling takes a long time.

I simplified the lines with a 5 meter tolerance (SAGA Line simplification tool) and then split the lines into smaller pieces (GRASS v.split.vert from the Processing toolbox). This speeds up rendering to a usable level.


For an offline user with little GIS experience, a tileset background would be the best solution. The slow process of generating the tiles is then on your side (and only once), not the users side.

256x256 standard OSM-like tiles can be created with gdal2tiles, Qtiles, Tilemill or Maperitive. Apart from the TileLayerPlugin inside QGIS, they can be used in Leaflet or Openlayers as well.

Alternatively, you could use mbtiles or vector tiles. Unfortunately, the implementation of vector tiles in QGIS is still in progress.

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.