I am new to QGIS and trying to import two thousand geo pngs to create a raster map. each png is indexed 2-4 colours.

I have tried several things:

  1. importing one by one works, as does to drag-and-drop all of them at once, but i have to confirm the CRS for every file which is not practical. is there a way to say 'yes to all' ?
  2. i've created a VRT, but when that is imported, the files all render black, except the first one that renders red. i've tried playing around with the vrt styles, but it seems that is meant to use the colors from only first 1-3 bands, and in my VRT every file is a separate band?
  3. I also have separate layers as b&w geo-tiffs, that were used to create the coloured pngs. however importing them has exactly the same issues as A+B above, either I have to manually create each one, or the map ends up black.

I guess i don't understand something basic about raster rendering in gdal.

1 Answer 1


a) Go to Settings->Options->CRS and in the section CRS for new layers select either Use project CRS or Use a default CRS and that will assume a CRS for layers you load without one (ie don't select Prompt for CRS).

b) Recreate your VRT but don't separate the layers into bands. Check the documentation on the switches but basically do not use the -separate switch. When you load it, you may need to load/calculate the statistics (which, with this large number of files could take a while) and the fiddle with the layer->style to get it to display nicely.

c) see a. If the resulting file is not too massive, you might consider merging all these original tiffs into one BigTiff file and then create a coloured png from that in one go. When merging the data note the creation options for BigTiff, predictor, tiled and compression in particular.

  • a) great, this worked! (b) i actually tried this before, but now i realized it still created multiple bands, because my paletted png's didn't all have the same palette, which i guess confused gdal. (c) it is too large, but i was now able to recreate vrts from original files and style them...
    – igzebedze
    Commented Nov 11, 2018 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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