I'm trying to combine several WMTS layers into a single VRT image. My goal is to have a single image with all the WMTS rasters mosaic'ed together. The input layers overlap in some places but for the most part are non-overlapping. Here is my file list:


And here's the command I'm running to create the VRT:

gdalbuildvrt -input_file_list files.txt output.vrt

When I load output.vrt into QGIS, the rasters don't render, and instead I see errors like the following:

GDAL_WMS>, band 1: IReadBlock failed at X offset 1073, Y offset 28: GDALWMS: ReadBlockFromFile (https://stormscdn.ngs.noaa.gov/20210830a-rgb/17/32603/54136) failed.

However, if I create two separate VRT files, one with each WMTS source, the resulting VRT files display correctly in QGIS.

I suspect this has something to do with the two WMTS sources having different extents, and GDAL trying to read from outside the extents of one source or another and running into an error. But I'm totally guessing here.

I also tried explicitly setting the extents of the output VRT to the max of the input layers, but that didn't work:

gdalbuildvrt -te -10397251.522 3377224.384 -9882376.626 3556696.735 -input_file_list noaa2.txt noaa2.vrt

Can someone help?



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.