TIFF files can contain overviews for quicker loading/displaying at small scales (=more "zoomed out").

These can be generated and added with GDAL's gdaladdo command. gdaladdo will compute the overviews by summarizing blocks of pixels as individual pixels. (Thus why the overviews are also sometimes called "pyramids".) This makes sense for orthophotography or for scalar-raster-geodata-encoded-as-image TIFFs (e.g. a DEM), but if the TIFF is a map, I think it might be more suitable to use smaller-scale (=more "zoomed out") maps (if available) as overviews that has e.g. a lower level of detail, omits some features and has captions that are still readable at that display size.

Is there a way to use separate images to create the overviews to be included in a TIFF, maybe even with GDAL command line tools?

Would doing so break any overview use-cases or tools that are also relevant for maps?

  • Interesting concept... I don't think anyone has done this before in a static raster. Are you suggesting dropping of details from the map like lesser roads and smaller cities as the pyramids are built? It's a good idea for a narrow selection of rasters, perhaps you could put that in as a request with GDAL gdal.org May 4 '18 at 13:47
  • 1
    For sure it has been done, for example here osgeo-org.1560.x6.nabble.com/…. The key seems to be to generate the tiff files of suitable size and name them as some.tiff.ovr, some.tiff.ovr.ovr and so on.
    – user30184
    May 4 '18 at 14:14

Yes you can.

I just tried this with a 1:100K raster topographic map and 1:250K and 1:1m topos as the "overviews". Works fine.

First I ensured each raster had the same extent.

Then on Windows I had to resort to renaming the smaller scale tiffs to "topo100k.tiff.ovr" and "topo100k.tiff.ovr.over", etc. as I didn't want to install ImageMagick or Irfanview to create multipage TIFFs.

On Linux I was able to just use the tiffcp utility to create a multipage TIFF to use as the overview file.

tiffcp topo250k.tif topo1m.tif topo100k.tif.ovr

The result:

enter image description here

enter image description here

enter image description here

> gdalinfo.exe topo100k.tif

Driver: GTiff/GeoTIFF
Files: topo100k.tif
Size is 15911, 7912
Coordinate System is:
        SPHEROID["WGS 84",6378137,298.257223563,
Origin = (146.287552142133137,-42.425406934716420)
Pixel Size = (0.000134582559863,-0.000134582559863)
Image Structure Metadata:
Corner Coordinates:
Upper Left  ( 146.2875521, -42.4254069) (146d17'15.19"E, 42d25'31.46"S)
Lower Left  ( 146.2875521, -43.4902241) (146d17'15.19"E, 43d29'24.81"S)
Upper Right ( 148.4288953, -42.4254069) (148d25'44.02"E, 42d25'31.46"S)
Lower Right ( 148.4288953, -43.4902241) (148d25'44.02"E, 43d29'24.81"S)
Center      ( 147.3582237, -42.9578155) (147d21'29.61"E, 42d57'28.14"S)
Band 1 Block=128x128 Type=Byte, ColorInterp=Red
  Min=0.000 Max=255.000
  Minimum=0.000, Maximum=255.000, Mean=189.173, StdDev=44.290
  Overviews: 6692x3328, 2381x1184
Band 2 Block=128x128 Type=Byte, ColorInterp=Green
  Min=0.000 Max=255.000
  Minimum=0.000, Maximum=255.000, Mean=200.430, StdDev=45.143
  Overviews: 6692x3328, 2381x1184
Band 3 Block=128x128 Type=Byte, ColorInterp=Blue
  Min=0.000 Max=255.000
  Minimum=0.000, Maximum=255.000, Mean=191.235, StdDev=57.065
  Overviews: 6692x3328, 2381x1184

Your Answer

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

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