[GIS] Does building a raster pyramid have benefits even if rasters only displayed zoomed in

image-pyramidsqgisraster

Standard advice about handling large raster datasets on QGIS (and elsewhere?) usually suggests building a raster pyramid. If I understand correctly this process creates reduced resolution (i.e. resampled rasters with smaller dimensions) copies of the raster images so that when zoomed out the GIS software can display these instead of the full resolution rasters.

When using professionally produced tiled raster mapping datasets, for example rasters from the UK Ordnance Survey for use as basemapping, it is normal to set up a QGIS project to use multiple different raster layers depending on zoom level. The consequence is that when zoomed out a different raster layer is used altogether.

When working in this way is there any gain from producing a raster pyramid, or will this actually be complicating things?

(I'm investigating how to improve performance in the situation described – where we use several VRT files with QGIS, each accessing a tiled raster dataset, some with a large number of tiles. I'm also be struggling with one dataset with so many tiles referenced by the VRT that my PC/QGIS can't cope, even when zoomed in to show only one tile.)

Best Answer

If raster data client always request data at pixel size which is smaller than the pixel size of the first overview/pyramid layer there is no gain to create overviews/pyramid layers. That's because GDAL reads data from the overview level that has equal or next better resolution that is required. Having overviews which are not needed mean about 30% of wasted disk space but there should be no effect on speed.

Accessing very large number of tiles though VRT gets slow because VRT does not support spatial index. Some discussion about that in http://osgeo-org.1560.x6.nabble.com/gdal-dev-Don-t-we-have-any-ideas-for-GSoC-2017-td5309810.html. I would consider using for example raster GeoPackage instead of VRT but it is a bit complicated to push different datasets to correct tile levels. It is still possible.

Related Question