[gdal-dev] gdal_translate is slow

Even Rouault even.rouault at spatialys.com
Wed Sep 4 08:04:15 PDT 2019

On mercredi 4 septembre 2019 08:50:09 CEST Sean Gillies wrote:
> Hi Denis,
> rio-convert lacks some of the features of gdal_translate (advanced metadata
> translation, statistics, &c) and it may be that the cost of those features
> is being especially felt in the GRIB case.

For a plain gdal_translate like that, shouldn't matter

> In fact, the core of
> gdal_translate has some GRIB-specific code that rasterio does not use:
> https://github.com/OSGeo/gdal/blob/master/gdal/apps/gdal_translate_lib.cpp#L
> 1763-L1782 .

That part of the code shouldn't be called at all for a plain gdal_translate, 
and even, it shouldn't impact performance

Without the exact dataset to reproduce, hard to know what happens.

An hypothesis might be that the dataset has many bands, and as the GTiff 
driver will produce a pixel-interleaved file, it might need to switch 
frequently between source GRIB bands, but there's a limited cache for those 
bands. If rio convert proceeds band by band, this might be more beneficial 
here. Blind and likely wrong guess...


Spatialys - Geospatial professional services

More information about the gdal-dev mailing list