[gdal-dev] Geoserver/gdal: large tif with multiple overviews - bug + workaround

Even Rouault even.rouault at spatialys.com
Mon Jan 14 02:54:28 PST 2019


On lundi 14 janvier 2019 12:00:27 CET Idan Miara wrote:
> Hi,
> 
> Due to the following bug:
> https://trac.osgeo.org/gdal/ticket/5067
> When I need to make multiple overviews for a large tiff I use the suggested
> workaround (making tif.ovr, tif.ovr.ovr, tif.ovr.ovr.ovr etc...).
> This workaround works well for applications that use gdal (i.e. QGIS) but
> Geoserver's internal GeoTiff reader ignores the multiple ovr files (I
> assume it reads only the tif+tif.ovr files) thus the performance for this
> map is very bad.
> 
> Workaround I found: I use the gdal-geoserver plugin and then create a
> trivial vrt for the tif and load it in Geoserver with the gdal plugin.
> I needed to make a VRT because as far as I can tell Geoserver doesn't
> register the GeoTiff format with gdal when the plugin is installed but
> still uses the internal GeoTiff reader).
> 
> A few questions:
> 1. Is there a plan to solve that very old gdaladdo bug? (I didn't check
> with recent gdal versions but it still not marked as resolved as in 6 years)

That could be very involved to fix that due to how things work in libtiff.

You can use the workaround suggested in the ticket to create a single file 
from all the .tif, .ovr, .ovr.ovr, etc.

gdal_translate process.tif process_with_ovr.tif -co COPY_SRC_OVERVIEWS YES -co 
COMPRESS=DEFLATE 

That will take some time, but not more than really needed.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list