I have a dataset comprising the entire province of Saskatchewan. The province is divided into 296 Rural Municipalites (RMs) which each produce a paper(!) map. As I acquire the maps (150 so far) I scan,georeference, and save as a separate gpkg, typically around 10 to 15 MB. I've built a number of maps for different parts of the province with the relevant RM maps included.

I would like to create a single map that includes all of the rasters but it becomes very slow in QGIS and crashes in QFIELD when I just include them all in one or more groups.

My second attempt is to create a VRT including all of the files using the following command:

gdalbuildvrt -resolution average -srcnodata "0 0 0 0" -allow_projection_difference -r bilinear  RM_maps.vrt ./*.gpkg

Because of missteps along the way the rasters are in 2 virtually identical (I think! epsg 26913 & epsg 2957) coordinate systems, and a couple are at a different resolution because the originating paper maps were huge. Some RM's have very irregular boundaries (along rivers, for example) so the files can overlap quite a bit, necessitating the nodata switch.

This almost works. I can't open the properties dialog for the vrt once it has been added because QGIS hangs, but I was able to set the max scale by copy-pasting it from one of the individual RM gpkg files. Now there is only a very slight lag, but sometimes the images don't display at all and sometimes they display badly. The effect is the same in QFIELD.

enter image description here

The image quality changes just west of the glitchy block where different maps meet, but I don't think overlapping maps is the problem. Panning a small amount will often fix the rendering problem.

So the question is whether I'm creating the VRT wrong, or whether I've just run into a limitation of the system. Or a bug that really noone else will ever care about!

Your Answer

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

Browse other questions tagged or ask your own question.