TransWikia.com

Combining overviews for large multiband raster image

Geographic Information Systems Asked on December 10, 2021

I have several large rasters, complete with overviews. I have combined these as separate bands of a multiband virtual raster. However, QGIS performs very slow viewing this vrt. Is there a fast way to produce an overview for this vrt?

One Answer

The .ovr overview is a multipage TIFF, consisting of successively coarser images. For the overview of a multiband image (as produced by gdaladdo) each of those pages is itself a multiband image.

In principle it should be possible to:

  1. Split the pages, from each band's overview, into separate files (almost by streaming i.e. without decompressing the image data),
  2. Collate those pages by resolution (e.g. build a multiband vrt for each zoom factor)
  3. Re-encode the image data, as a multiband TIFF image for each zoom factor. (Only at this step the image data may need to be decompressed and recompressed, to facilitate the reorganisation.)
  4. Gather the multiband series together as pages of a single file.

A complication is that Libtiff utilities don't have great support for GDAL extensions (such as the nodata value tag); ImageMagick utilities (e.g. convert) have a tendency to always (prematurely) decompress the data into an image in memory.

As for GDAL utilities: gdaladdo accepts a COPY_SRC_OVERVIEWS option, but still seems inexplicably slow. May be able to copy a page by referring to it as GTIFF_DIR:<page$>:<filename>?

Answered by benjimin on December 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP